Copied to clipboard

Flag this post as spam?

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


  • Manish 3 posts 23 karma points
    Apr 23, 2012 @ 09:32
    Manish
    0

    stop richtexteditor to remove anchor tag

    hi

    i am new to umbraco.

    i would  write code like

    <a href="#">
            <div class="control_third">
                    <div class="text">
                           <p>
                                  ISO 14001 and
                                   <br />
                                   9001 Assessment
                                   <br />
                                   &amp; Compliance
                                   <br />
                                   Support</p>

                      </div>
                            </div></a>

     

    thanks.

  • Dan 1285 posts 3917 karma points c-trib
    Apr 23, 2012 @ 20:19
    Dan
    1

    Hi Manish,

    The problem you're going to face with this is that your syntax isn't valid - you're trying to nest block level elements (divs and paragraphs) inside inline elements, which isn't good HTML.

    The WYSIWYG editor tries (as best it can) to ensure that the code it produces is valid, so doing something like the above will cause it to strip out tags in an effort to make your HTML conform to standards.

    There are ways to make TinyMCE (the system behind the WYSIWYG editor) less strict e.g. see http://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-(tinymce)/allow-any-markup-in-the-tinymce-editor but you're really best trying to tackle this properly and re-format your HTML.

    Hope this helps.

  • Ed Salwin 8 posts 72 karma points
    Dec 13, 2016 @ 17:38
    Ed Salwin
    0

    Add the following line to tinyMceConfig.config in the <customConfig> section:

    <config key="valid_children">+a[div|p]</config>

    More information: https://www.tinymce.com/docs/configure/content-filtering/#valid_children

Please Sign in or register to post replies

Write your reply to:

Draft