TinyMCE Editor - versions

Erweiterungen
Post Reply
tze_frog
Posts: 12
Joined: Sun 3. Feb 2013, 15:28

TinyMCE Editor - versions

Post by tze_frog »

I have recently installed TinyMCE v. 4.9.11. It removes a function call e.g.

<input onclick="verify()" type="button" value="OK">
is automatically translated to
<input type="button" value="OK">
and is therefore not working.

I then reinstalled TinyMCE v. 3.4.5 and re-entered the function call - and works again.

Why does the newer version remove calls?

Best regards
Anders Pedersen, Denmark
Gert
Posts: 2410
Joined: Sun 18. Nov 2012, 14:18

Re: TinyMCE Editor - versions

Post by Gert »

tze_frog wrote: Wed 27. May 2026, 16:41 Why does the newer version remove calls?
I don't know - I assume, it's because the developers wanted it so ;)

You can define "extended_valid_elements:" in your init_???.js in the folder ./plugins/tinymce/inits/ - normally init_full.js is selected in the CMS configuration:

Settings => CMS => Editor => Tinymce_toolbar: => full

Open the file init_full.js, search for "extended_valid_elements:" and extend it:

Code: Select all

extended_valid_elements: "script[type|language|src],i[class],input[onclick|type|value]",
Now onclick, type and value are allowed for the input element.

You also may copy the init_full.js to init_tzefrog.js, do the changes in this file and activate it in the CMS configuration, so it is update-safe,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Gonzo Gates
Posts: 356
Joined: Thu 19. Jan 2023, 21:46

Re: TinyMCE Editor - versions

Post by Gonzo Gates »

Hallo Gert,

wie gut, dass ich mir diesen Post angesehen habe, denn ich habe festgestellt, dass ich in 'extended_valid_elements' ein Komma zu setzen vergessen habe. Vielleicht ist das nie aufgefallen, weil ich in 'custom_elements' das Element auch erwähnt habe. Ich hatte vor einiger Zeit ein Problem mit span-Tags in Tiny, das du gelöst hattest. Ich habe sogar das marquee- und das i-Tag drin.

Jetzt kann Anders Pedersen meinen Text durch den KI-Übersetzer jagen. (Ich hatte keine Lust auf dänisch zu schreiben)

Gruß
Gonzo
Ich kenne keinen Sysadmin oder Programmierer, der sich noch nie ins Knie geschossen hat; mich mit eingeschlossen :!:
Post Reply