Search code examples
tinymcemodxmodx-revolutiontinymce-plugins

Config TinyMCE, TinyMCErte by a external config JSON-File


In MODX Revo, TinyMCErte I try to configure the PlugIn via the key tinymcerte.external_config. The config-File has to be valid JSON. Here is my block, it is ignored. I want TinyMCE not to convert special characters like german umlaute (öäü) and of cource & should stay & and not &

tinymce.init({
    forced_root_block : false,
    entity_encoding : "raw"
})

Solution

    1. TinyMCE Rich Text Editor (Ver. 1.1.1) is reading the external config file.
    2. the path could be e.g. ../assets/components/tinymcerte/ext-config.json, but it would be advisible to store it in a non web accesible place. Although this github-entry implies that it reads external config files vom core-path, assets-path and base-path I was not able to get it to work.
    3. the content of the external config file has to be valid JSON:

    { "forced_root_block" : false, "entity_encoding" : "raw" }

    1. The keys must be wrapped in "", in contrast to "native" TinyMCE settings (but not sure on this one...)