tinyMCE configuration changes

#1

FarCry platform uses the open source tinyMCE editor as the default rich text editor. You can customise the tinyMCE config in a number of ways:

  • use the webtop tinyMCE config to override the default configuration (simplest)
  • inject a custom config as a formtool attribute
  • override the behaviour of the richtext formtool

Override the default configuration

Login to the webtop and update the tinyMCE config.

Enable the config.

Example, based on the default FarCry config.

plugins : "farcrycontenttemplates,layer,table,hr,image_farcry,link_farcry,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,anchor,charmap,code,textcolor",
extended_valid_elements: "code,colgroup,col,thead,tfoot,tbody,abbr,blockquote,cite,button,textarea[name|class|cols|rows],script[type],img[style|class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]",
menubar : false,
toolbar : "styleselect | bold italic underline | undo redo | cut copy paste pastetext | bullist numlist link image table | farcrycontenttemplates farcryuploadcontent | code | fullscreen",
remove_linebreaks : false,
forced_root_block : 'p',
relative_urls : false,
entity_encoding : 'raw'

Note, this config has the toolbar entries slightly rearranged.

Update the application; refersh all the configs.

Troubleshooting

If you get either no tinyMCE edit box or all of the functionality stripped away leaving only the text box you likely have a Javascript error from an invalid configuration. Check your browser’s console and correct.