5

The "HTML" button no longer seems to show in the WYSIWYG. The button is set in the Redactor config file like so:

{
    "buttons": ["html","formatting","bold","italic","unorderedlist","orderedlist","link","image","video"],"plugins":["fullscreen","video"],
    "toolbarFixed": true
}
  • 2
  • Wish I saw that earlier :(. I could not find any info in the Craft docs. – Andy Dec 3 '15 at 11:30
  • 1
    Yeah, Brandon posted it on Slack. I also didn't find a link from the docs. – carlcs Dec 3 '15 at 11:35
8

It turns out that the latest redactor seems to now have a plugin for viewing the source. You can enable this in your redactor JSON config file under plugins. Just add the "source" plugin like so:

{
    "buttons": ["format", "bold", "italic", "lists", "image"],
    "plugins":["fullscreen", "source"],
    "toolbarFixed": true
}
|improve this answer|||||
  • I have two files, Simple.json, and Standard.json. All of my Rich Text fields were set to default. So I added another file in /config/redactor/Default.json with the above and this adds another Default option if I change it to the new Default it works. Is there not a way to change the default options without adding another Default option. It's going to be a pain to go through and change them all to standard as I have a lot of different matrix blocks, fields, etc. – Bowenac Dec 4 '15 at 20:12
  • I could be wrong, but I imagine the "default" setting will use the defaults set by the redactor library. It might be worth asking this as a separate question. One thing you could try is to backup your database, then go to the craft_fields table and then do a find and replace in the settings column on the rich text fields. They're set like this: {"configFile":"Standard.json","columnType":"text"} A rich text field with default selected will look something like this: {"configFile":"","columnType":"text"}. Not tried this myself but it may work. – Andy Dec 4 '15 at 21:35
  • I already changed them all to Standard, and updated Standard.json. Just seems like an odd redactor update. Also images are now no longer able to be dragged around to resize etc. Now looking into that. – Bowenac Dec 4 '15 at 23:09
  • Good luck! There have been a few issues with image magic and the latest update. I highly recommend joining the Craft slack channel if you haven't already. Quite a few people are having issues and sharing fixes etc due to the update. – Andy Dec 4 '15 at 23:54
5

You need to add "html" in the buttons array, and not "source" in the plugins array.

|improve this answer|||||

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.