Javascript in links

CMSimple 4.0 und höher
faujsniufade
Posts: 2
Joined: Wed 11. Jan 2017, 14:14

Javascript in links

Postby faujsniufade » Sat 30. Dec 2017, 12:05

Hi everybody.

I'm transferring an old 3.2 website to the most recent version of CMSimple, and run into a problem.

When I select some text, add a link to it, and define the target as javascript:some_code, the javascript code is removed on save. But I need it to obfuscate an email address.

How can I enter javascript as a link URL?

thank you.

faujsniufade
Posts: 2
Joined: Wed 11. Jan 2017, 14:14

Re: Javascript in links

Postby faujsniufade » Sat 30. Dec 2017, 13:23

OK, found it by myself.

It's not a CMSimple issue, but a config option of the tinyMCE editor. To fix, go to .../plugins/tinymce/inits and add the line

Code: Select all

    allow_script_urls: true,


directly behind the line

Code: Select all

    selector: "cmsimple-editor",


in the files

    init_full.js
    init_medium.js
    init_minimal.js
    init_narrow.js
    init_sidebar.js

so the files look like this:

Code: Select all

var tinyConfig = {
//      convert_urls: false,
    selector: "cmsimple-editor",
    allow_script_urls: true,
    skin: "cmsimple",
    [...]


Return to “CMSimple 4.0 and higher”

Who is online

Users browsing this forum: No registered users and 10 guests