stop tinymce replacing urls with relative url's

If you have been using tiny mce for your content editing, you will sometimes find that it replaces your full url strings with its relative ones.

This can be annoying so this is how you can disable it.

Javascript

// add this to your tiny mce init
relative_urls: false,
convert_urls: false,
remove_script_host : false,

// this was my tinymce load function
  function load_tinymce_test(idclass) {
      tinymce.init({
          selector: idclass,
          plugins: [ "spellchecker code autolink link image fullscreen searchreplace wordcount visualblocks visualchars insertdatetime media table paste textcolor textpattern emoticons media lists" ],
          toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link unlink image | code | forecolor backcolor | emoticons",
          image_advtab: true,
          height: 400,
          content_css : "/css/style.css"
      });
  }

// which will now change to this
// this was my tinymce load function
  function load_tinymce_test(idclass) {
      tinymce.init({
          selector: idclass,
          plugins: [ "spellchecker code autolink link image fullscreen searchreplace wordcount visualblocks visualchars insertdatetime media table paste textcolor textpattern emoticons media lists" ],
          toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link unlink image | code | forecolor backcolor | emoticons",
          image_advtab: true,
          height: 400,
          content_css : "/css/style.css",
          relative_urls: false,
          convert_urls: false,
          remove_script_host : false
      });
  }

Other Items in javascript
Page Views

This page has been viewed 82 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

❤👩‍💻🕹

Random Quote
Even if you fall on your face, you're still moving forward.
Victor Kiam