How to custom set configuration in Moodle for TinyMCE editor to keep and save relative addresses/URLs? see image 1.
How to ensure how to enable/retain relative URL addresses in Moodle (TinyMCE editor)?
We use TinyMCE to edit content in the Moodle editor. We know Atto editor is default and was built specifically for Moodle, but we need TinyMCE editor.
We would like to use but relative addresses for images for more efficient maintenance and later migration to another server.
We found that the default Atto editor does not have problems with relative addresses, but the TinyMCE editor does.
We also found settings for changing parameters in the documentation https://www.tiny.cloud/docs/configure/url-handling/#convert_urls
In Moodle there should be a path for this: Administration > Site administration > Plugins > Text editors > Manage editors > custom configuration
We just don't know in which correct JSON format to find those parameters. How the right custom configuration should look in JSON format? Yes, we know the JSON format, but not one variant works completely correctly.
1st variant:
tinyMCE.init({
relative_url :false,
remove_script_host : false,
convert_urls: false
});
2nd variant:
{
relative_url : 0,
remove_script_host : 0
}
[Moodle TinyMCE custom configuration][1] [1]: https://i.stack.imgur.com/QLBBs.png