라이브 데모
SolidEdit · 라이브 데모
기존 textarea에 연결해 리치 텍스트와 Markdown을 편집하는 브라우저 에디터이며 full과 mini가 같은 도구와 저장 HTML 계약을 사용합니다.
준비됨
매뉴얼
SolidEdit · 매뉴얼
기존 textarea에 연결해 리치 텍스트와 Markdown을 편집하는 브라우저 에디터이며 full과 mini가 같은 도구와 저장 HTML 계약을 사용합니다.
- 1
글쓰기에는 기본 full을, 댓글에는 toolbarSize가 mini인 모드를 선택합니다. 두 모드 모두 도구를 접지 않고 한 번에 보여줍니다.
- 2
내용을 편집한 뒤 HTML과 Markdown 출력을 전환해 host가 서버에 전달할 값을 확인합니다.
- 3
초기화로 데모 초안만 지웁니다. 로그인, 서버 저장, 업로드, HTML sanitize와 활동 로그는 host 서비스의 책임입니다.
API · 문서
mountContentEditor()
기존 textarea에 연결해 리치 텍스트와 Markdown을 편집하는 브라우저 에디터이며 full과 mini가 같은 도구와 저장 HTML 계약을 사용합니다.
- mountContentEditor(target, options)
- initContentEditor(options)
- getHTML() · getMarkdown()
solid-edit-0.0.3.htmlSHA · SRI
<script>
window.CONTENT_EDITOR_AUTOSTART = false;
window.CONTENT_EDITOR_AUTOINIT = false;
</script>
<textarea id="postBody"></textarea>
<textarea id="commentBody"></textarea>
<script
src="https://cdn.jsdelivr.net/gh/statground/solid-edit@2937334e689e6be05728ac6b8027620be5172ed9/versions/0.0.3/editor.js"
integrity="sha384-+Qqh/Ul1oVa52v9XRTKFobaNl9opsASqxtLR2IZ002tk3Y1yppoilJ1gMQ8SEXrb"
crossorigin="anonymous">
</script>
<script>
const full = window.mountContentEditor("#postBody", {
storageKey: "post-draft"
});
const mini = window.mountContentEditor("#commentBody", {
storageKey: "comment-draft",
toolbarSize: "mini"
});
</script>
상태
초기화로 데모 초안만 지웁니다. 로그인, 서버 저장, 업로드, HTML sanitize와 활동 로그는 host 서비스의 책임입니다.