22Slides V2's Prosemirror-based text editor.
npm run dev
- http://localhost:10002/test/index.html
- http://localhost:10002/test/multiple.html
- http://localhost:10002/test/frame.html
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)
}
})
- Run the compiler:
npm run build
- Publish to main git branch