Is this just for sharing a solution or do you have an actual issue? Looking on your original code above it seems that it's not well-formed and the changes you have made in order to allow anything in the editor does not seem to help correct your code...So not sure what your point with this exactly is?
What is the purpose of having the empty anchor around your heading? Is it the intention to be able to make an anchor to a named section elsewhere in your code?
If so then you should be able to define an anchor using the rich text editor rather than having to do it by hand I think. But if you're doing it by hand the above example should work. But the code you originally showed was flawed because you did not have the starting tag in the beginning. You only had the closing one.
Ok - But I'm a bit confused then - Is the problem that no matter what you do the rendered output does not allow you to add the link around the h2 element? :) Sorry if I'm being slow here...
Did you recycle the app pool after making the changes to the configuration file btw? If not then please try doing that. It should always be done after modifying files in the /config/ folder.
Stopping richtexteditor to move anchor tag
Im adding the following html in umbraco Richtext Editor.
<div><img src="" alt="Image" /><h2>Heading</h2></a> </div>
The following what i get once i click 'OK' and repoen it again
<div><img src="" alt="" /> </a><h2>Heading</h2><a href="Images"></a></div>
I did the following for the config files,
config/umbracoSettings.config and tinyMceConfig
Hi Shiraz and welcome to our :)
Is this just for sharing a solution or do you have an actual issue? Looking on your original code above it seems that it's not well-formed and the changes you have made in order to allow anything in the editor does not seem to help correct your code...So not sure what your point with this exactly is?
/Jan
Hi Jan,
Sorry for the confusion, the last part is what i found from this post https://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-(tinymce)/allow-any-markup-in-the-tinymce-editor while doing research on this. But didn't seem to work. as you have mentioned.
Is there a way to add the following html and save it?
<div><a href="#"><img src="" alt="Image" /><h2>Heading</h2></a> </div>
Hi Shiraz
What is the purpose of having the empty anchor around your heading? Is it the intention to be able to make an anchor to a named section elsewhere in your code?
If so then you should be able to define an anchor using the rich text editor rather than having to do it by hand I think. But if you're doing it by hand the above example should work. But the code you originally showed was flawed because you did not have the starting tag in the beginning. You only had the closing one.
/Jan
Hi Jan,
The anchor will not be empty.I wanted to show the structure of the HTML. The original code posted was not correct ( sorry about that) :).
Hi Shiraz
Ok - But I'm a bit confused then - Is the problem that no matter what you do the rendered output does not allow you to add the link around the h2 element? :) Sorry if I'm being slow here...
/Jan
The problem is, The editor is not allowing me to place the <h2> within the <a>. Weird.
Shiraz
Hi Shiraz
What is that exact version of Umbraco that you're using?
/Jan
Hi Jan,
Version 7.1.7
Hi Shiraz
Did you recycle the app pool after making the changes to the configuration file btw? If not then please try doing that. It should always be done after modifying files in the /config/ folder.
/Jan
Hi Jan,
yes recycled the app pool, still not working.
Hi Shiraz
I'm afraid that I'm all out of ideas then :-/
/Jan
Hi Jan,
It's fine. will leave it for now. :)
is working on a reply...