tiff / wysihtml5

Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.
http://xing.github.com/wysihtml5/
MIT License
6.5k stars 1k forks source link

Source view documentation? #531

Open emsal0 opened 9 years ago

emsal0 commented 9 years ago

On http://wysihtml.com/, the example text editor has a "show source" button that shows the HTML source of the editor. However, the wiki doesn't show how I can implement this in my own wysihtml editor.

More than a code issue, this is a documentation issue more than anything else.

harrybailey commented 8 years ago

Add an anchor inside your toolbar that contains these attributes:

<a href="javascript:;" data-wysihtml5-action="change_view">html</a>