Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Shiraz 11 posts 33 karma points
    Feb 19, 2015 @ 12:16
    Shiraz
    0

    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

    <TidyEditorContent>False</TidyEditorContent>
    <validElements><![CDATA[*[*]]]></validElements>
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 19, 2015 @ 12:26
    Jan Skovgaard
    0

    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

  • Shiraz 11 posts 33 karma points
    Feb 19, 2015 @ 12:34
    Shiraz
    0

    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>

     


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 19, 2015 @ 12:43
    Jan Skovgaard
    0

    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

  • Shiraz 11 posts 33 karma points
    Feb 19, 2015 @ 15:07
    Shiraz
    0

    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) :).

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 19, 2015 @ 15:17
    Jan Skovgaard
    0

    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

  • Shiraz 11 posts 33 karma points
    Feb 19, 2015 @ 15:17
    Shiraz
    0

    The problem is, The editor is not allowing me to place the <h2> within the <a>. Weird.

    Shiraz

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 19, 2015 @ 15:21
    Jan Skovgaard
    0

    Hi Shiraz

    What is that exact version of Umbraco that you're using?

    /Jan

  • Shiraz 11 posts 33 karma points
    Feb 19, 2015 @ 15:56
    Shiraz
    0

    Hi Jan,

    Version 7.1.7

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 19, 2015 @ 16:11
    Jan Skovgaard
    0

    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

  • Shiraz 11 posts 33 karma points
    Mar 02, 2015 @ 05:01
    Shiraz
    0

    Hi Jan,

    yes recycled the app pool, still not working.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 02, 2015 @ 15:31
    Jan Skovgaard
    0

    Hi Shiraz

    I'm afraid that I'm all out of ideas then :-/

    /Jan

  • Shiraz 11 posts 33 karma points
    Mar 03, 2015 @ 07:46
    Shiraz
    0

    Hi Jan,

    It's fine. will leave it for now. :)

     

Please Sign in or register to post replies

Write your reply to:

Draft