2

Is there a way to make a Rich Text field using Redactor, to only display and allow input in the HTML view?

The first step I tried was making a redactor config file that looks like this:

{
    "buttons": ["html"],
    "plugins": [],
    "toolbarFixed": false
}

But the default view is still the WYSIWYG view. I want the HTML button to be toggled by default...

Many thanks for any help!

1

I don’t think it’s possible at all and what’s the benefit of using a WYSIWYG field at all when you don’t use any of the features.

I’d rather use a plain text field or even better, a field type which is optimized for code editing like the Simple Text field type.

https://github.com/craftcms/simple-text/tree/v1

|improve this answer|||||
  • Great plugin recommendation! The reason for not using a plain text field was to make the code more readable. But this plugin does that! – bravokiloecho Oct 5 '17 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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