mrpatg
mrpatg

Reputation: 10117

tinymce changing urls

I have tinyMCE on a simple text file editor, but when i enter a url that is the same as the server, and include the text file through php, it reads http://../directory, instead of http://www.domain.com/directory.

Upvotes: 2

Views: 1141

Answers (1)

Andrew
Andrew

Reputation: 38699

tinyMCE URLs are generally pretty tricky, but manageable. They have a whole section dedicated to making them work here.

Essentially you need to add two settings to your config file

tinyMCE.init({
    relative_urls : false,
    document_base_url : "http://www.site.com/path1/"
});

That should rewrite all your URLs using the base url, avoiding the relative ../s

Upvotes: 3

Related Questions