I'm using TinyMCE for Editing my site content.
In Local I've different path for my base url and on development server its different and on production its different.
Is there any way to define the something like baseURL for my links and basePath for Images to be linked.
I want to define baseURL to all my links and basePath to my all the Images.
Right now I'm working on my local and I've created few pages. But when I've thought of dev and production It will be difficult to do the path changing task. Please desperately need some solution.
I think you will need to set these three options:
relative_urls : false,
remove_script_host : false,
document_base_url : "http://www.example.com/path1/"
According to the TinyMCE documentation, this will convert all relative urls to fully qualified URLs, based on the base you provide.


function myCustomURLConverter(url, node, on_save, name) {
// Do some custom URL conversion
if (name == "src")
{
url = window.location.origin +"/uploads/" + url
}
// Return new URL
return url;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With