RichtextEditor inserting HTML
Is there a possibility to insert HTML Text and save it unescaped to the db in the RichtextEditor?
7 Replies
Sorry. I was too imprecise with my explanation.
I want to be able to insert HTML content and keep the HTML tags explicitly so that I can embed the content later in the same way.
I think it saves it as html in the data column when using a rich editor so no extra work required login to the database and check it to confirm
here is an example where am using the rich editor as you see it does save the tags
True that. My point was when I insert HTML I have written elsewhere the RichtextEditor saves it escaped to the database.
It wraps it in his own tags tough, as you mentioned.
It’s going through a sanitizer to help protect from xss vulnerabilities.
The underlying trix editor could be doing its own sanitizing as well. A lot of rich text editors work that way.
If you actually need Freeform html then you’re probably going to have to do a custom field where you have more control over what’s allowed and what isn’t.
Okay, thank you Adam. That's a solution I can work with.