Is there a way, to directly edit html source code? I mean, is there a way, to add a button to toggle wysiwyg view to source-code view?
This should be possible right now. There is an @update event on the editor component where you can grab the current HTML. Then you could add a toggle button and render this HTML in a textarea. And on change you could set the new content with this.$refs.editor.setContent('<div>your html</div>').
Would be a nice example for the demo page btw.
Thank you!
Hi,
I need to render in some case the html content directly in the editor. If copy paste, that works, but when i set the content on editor creation, i can't figure out how to render html source code.
Then you could add a toggle button and render this HTML in a textarea.
Are you talking about another text area than the editor ? I don't understand how can i do what you said
EDIT: I just saw that a feature has been released to view source code. How can i use this feature ?
Thanks.
Most helpful comment
This should be possible right now. There is an
@updateevent on the editor component where you can grab the current HTML. Then you could add a toggle button and render this HTML in a textarea. And on change you could set the new content withthis.$refs.editor.setContent('<div>your html</div>').Would be a nice example for the demo page btw.