Prosemirror-based drop-in editor
Tests
Usage
import Editor from "../dist/editor.js"
Editor({
element: document.querySelector('.text'),
menu: [
{ type: "strong", title: "Bold", icon: '<strong>B</strong>' },
{ type: "em", title: "Italic", icon: '<em>i</em>' },
{ type: "link", title: "Create a link", icon: 'link' },
{ type: "divider", icon: '' },
{ type: "h2", title: "Large Heading", icon: 'h2' },
{ type: "h3", title: "Small Heading", icon: 'h3' },
{ type: "divider", icon: '' },
{ type: "ul", title: "Bullet List", icon: 'ul' },
{ type: "ol", title: "Numbered List", icon: 'ol' },
{ type: "blockquote", title: "Quote", icon: 'quote' },
{ type: "hr", title: "Horizontal Line", icon: 'hr' }
],
change: (data) => {
console.log(data)
}
})
Prosemirror-based drop-in editor
Tests
Usage
import Editor from "../dist/editor.js"
Editor({
element: document.querySelector('.text'),
menu: [
{ type: "strong", title: "Bold", icon: '<strong>B</strong>' },
{ type: "em", title: "Italic", icon: '<em>i</em>' },
{ type: "link", title: "Create a link", icon: 'link' },
{ type: "divider", icon: '' },
{ type: "h2", title: "Large Heading", icon: 'h2' },
{ type: "h3", title: "Small Heading", icon: 'h3' },
{ type: "divider", icon: '' },
{ type: "ul", title: "Bullet List", icon: 'ul' },
{ type: "ol", title: "Numbered List", icon: 'ol' },
{ type: "blockquote", title: "Quote", icon: 'quote' },
{ type: "hr", title: "Horizontal Line", icon: 'hr' }
],
change: (data) => {
console.log(data)
}
})