Editor

富文本编辑器。

Demo

  1. import { render, h } from 'omi'
  2. import 'omim/editor'
  3. render(
  4. <div>
  5. <m-editor onTextChange={onTextChange}>
  6. <h1 class="ql-align-center">Quill Rich Text Editor</h1>
  7. <p><br /></p>
  8. <p>Quill is a free, <a href="https://github.com/quilljs/quill/">open source</a> WYSIWYG editor built for the modern web. With its <a href="https://quilljs.com/docs/modules/">modular architecture</a> and expressive <a href="https://quilljs.com/docs/api/">API</a>, it is completely customizable to fit any need.</p>
  9. <p><br /></p>
  10. <iframe class="ql-video ql-align-center" src="https://player.vimeo.com/video/253905163" width="500" height="280" allowfullscreen></iframe>
  11. <p><br /></p>
  12. <h2 class="ql-align-center">Getting Started is Easy</h2>
  13. </m-editor>
  14. </div>, 'body')
  15. function onTextChange(evt) {
  16. console.log(evt)
  17. }