"Code" mode for rich text editor

It would be nice if the rich-text editor supported toggling a "raw code" mode. So that we could edit the HTML directly when needed.

Hi @byron!

This is a nice feature request! For the moment maybe you can consider this as a workaround:

You can link a text area component to your rich text editor component to let you edit its HTML directly. To do this set the default value of your rich text editor to {{ textArea.value }}

And then set an event listener to update the text area with whatever the current value of the rich text editor is when focused

The HTML string won't be formatted but there are a number of examples of JS functions you can grab and insert into your script to handle the formatting for you.

1 Like