Add StackEdit to any website
markdownmarkdown-editorstackediteditor
주요 지표
스타 성장
스타
1.2k
포크
129
주간 성장
+-1
이슈
23
5001k
2023년 1월2023년 8월2024년 4월2024년 11월2025년 7월2026년 3월2026년 10월
아티팩트npm
README
stackedit.js
Add StackEdit to any website
Build setup
# install dependencies
npm install
# watch and build for dev
npm run dev
# build for production
npm run build
Quick start
Bind StackEdit to a textarea:
// Import the lib.
import Stackedit from 'stackedit-js';
// Get the textarea.
const el = document.querySelector('textarea');
// Create the Stackedit object.
const stackedit = new Stackedit();
// Open the iframe
stackedit.openFile({
name: 'Filename', // with a filename
content: {
text: el.value // and the Markdown content.
}
});
// Listen to StackEdit events and apply the changes to the textarea.
stackedit.on('fileChange', (file) => {
el.value = file.content.text;
});
Documentation
Full documentation can be found at https://benweet.github.io/stackedit.js/.