Hi,

I've added the TinyMCE plugin to my website to change all textareas to the editor.
Upon completing, the values from the editor get stored in the database.

When adding a link via the button in the editor, the link appears as normal (when checked in the HTML), eg. http://www.google.co.uk

However, when checking the database, it becomes apparent that the editor is changing my entry on submission, as it now appears as /http://www.google.co.uk therefore meaning that when clicked, the website interperts it as a part of the current site (so when actually clicked it goes to http://www.clickteesside.com/http://www.google.co.uk - a none existent page).

In the TinyMCE_src.js file the sections that I have read about changing (However can't seem to find the correct combination) are:

document_base_url : tinymce.documentBaseURL,
convert_urls : 1,
relative_urls : 1,
remove_script_host : 0,

If someone could assist me with this, I'd be grateful!

Had a look at this, doesn't work unfortunately, still adding slashes before the http causing it to go relative to the current site :\

Member Avatar for LastMitch

Had a look at this, doesn't work unfortunately, still adding slashes before the http causing it to go relative to the current site :\

I assume you are on your host server.

If you can't get rid of the slash on TinyMCE then you need to used stripslashes() function to get rid of the slashes. That is your workaround.

Thank you LastMitch works a treat!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.