You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no API method for setting HTML content via code. You can retrieve HTML content with getSemanticHTML() but there is not way of setting this via the API. You can set plain text with setText() but that renders all HTML tags as plain text.
As a workaround you can do the following:
quill.root.innerHTML = myHtmlContent;
But this is unpleasant and could be easily implemented in the API with a setSemanticHTML(string) method. Named as such for consistency with the get method. However you may want to add range parameters etc. which would involve a more complex implementation.
Version 2.0.0
The text was updated successfully, but these errors were encountered:
Many thanks @luin, that works for me, but it's not very intuitive or obvious. I think at least there should be something in the documentation to indicate how to do this, or simply implement your code in a method as I suggested.
There is no API method for setting HTML content via code. You can retrieve HTML content with getSemanticHTML() but there is not way of setting this via the API. You can set plain text with setText() but that renders all HTML tags as plain text.
As a workaround you can do the following:
But this is unpleasant and could be easily implemented in the API with a setSemanticHTML(string) method. Named as such for consistency with the get method. However you may want to add range parameters etc. which would involve a more complex implementation.
Version 2.0.0
The text was updated successfully, but these errors were encountered: