Get HTML from Delta on Quill

前端 未结 3 1742
天涯浪人
天涯浪人 2021-02-19 22:41

I am trying to get HTML code from delta on Quill.

This is my code






<         


        
3条回答
  •  不要未来只要你来
    2021-02-19 23:14

    Yes you're right, extracting HTML not work, but the problem is quill refuse to support getHTML() function. https://github.com/quilljs/quill/issues/903

    But you can use quill.root.innerHTML. Try this:

    http://jsbin.com/zuniqef

    
    
    
      
      
      JS Bin
      
    
    
    
    
    
    
    
    
    
    
    
      
    HTML:

    If this editor (quill) is not support getHTML (which is important for future use). I recommend you to use another text editor library like: ckeditor which my best recommendation in 4 years used it (absolutely I try many text editors too in that period).

提交回复
热议问题