One of our customers would like to have full control over the input in the richtext editor.
This means that they want to be able to use the editor as normally, but also want to be able to insert some custom HTML-code.
In more details right now they want to insert the following piece of code in the editor:
In the umbracoSettings.config file under the imaging section there should be an element called allowedAttributes.
It's described as so:
<-- what attributes that are allowed in the editor on an img tag -->
<allowedAttributes>src,alt,title,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
Simply add the mouseover and mouseout attributes and they are no longer stripped from the mark up.
Why it was decided to add another layer of html tidying I would love to know :P
Keeping Tidy disabled and setting validElements in TinyMce to *[*] is properly still a good idea considering your clients apparent needs.
Allowing any elements in the RTE in V4.11.8
Hi all
One of our customers would like to have full control over the input in the richtext editor. This means that they want to be able to use the editor as normally, but also want to be able to insert some custom HTML-code.
In more details right now they want to insert the following piece of code in the editor:
A simple image-swap function.
I know that this is not the best practise, and they can screw things up, but they are fully aware of this, and they still want us to set it up.
I've tried the following guide to make this happen: https://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-%28tinymce%29/allow-any-markup-in-the-tinymce-editor
Unfortunatelly it doesn't seem to work, and the code is still stripped.
Any of you knows how this can be achieved, or what might be wrong?
Thanks in advance.
/Kim A
Hi Kim
I was not able to make it work directly on the tag either but it seems like it's possible to fire the events on the surrounding
I tried on a fresh installation of 4.11.10...so it should work on your installation as well.
Have a nice weekend mate.
/Jan
In the
umbracoSettings.config
file under theimaging
section there should be an element calledallowedAttributes
.It's described as so:
Simply add the mouseover and mouseout attributes and they are no longer stripped from the mark up.
Why it was decided to add another layer of html tidying I would love to know :P
Keeping Tidy disabled and setting
validElements
in TinyMce to*[*]
is properly still a good idea considering your clients apparent needs.Tested on an old Umbraco 4.11.6.
Cheers
Mads
Wohoo, it works!
Thanks both of you. Mads, I used your solution this time.
Thanks again :)
/Kim A
Glad you got it working :)
is working on a reply...