1

I hate WYSIWYG.
I prefer to write my own html but can't figure out how to put that into a field for entries content.

I tried plain text but that does not work.
I tried to disable cleanup and purify html on Redactor and CKEditor but if i switch to the html view my code is not like it was before saving.

1 Answer 1

2

Redactor applies all kinds of 'improvements' to your HTML on save. You might be able to prevent this behaviour by altering the config.

If you want to use a plain text field for html, your only problem is that Twig applies html_encode to outputted text. You can prevent this by using the |raw filter:

{{ entry.plainTextField |raw }}
2
  • raw works. I did check ExpressionEngine and there the field type is called "Textarea" and it's possible to disable the text formatting. Commented Jul 15, 2019 at 3:19
  • I found the "Simple Text" field plugin. In combination with raw it is like Textarea in EE. Commented Jul 15, 2019 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.