WYSIWYG is nothing but a Div tag with the Contenteditable attribute, which helps to highlight in bold, italic, etc., and the content you see is a version of the HTML code.
if you want to get HTML code, just get innerHTML of content available for content, it will give you html code. let me know if you need more help.
source
share