Copied to clipboard

Flag this post as spam?

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


  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 09:31
    Abdullah Anwar
    0

    Allow All html tags in tinymce

    Hi

     

    Can you please help us to allow all thml tags in the tinymce

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

    Hi Abdullah

    In the /config/TinyMceConfig.config file you can allow all tags be replacing everything inside

    <validElements>
          <![CDATA[*]>
        </validElements>
    

    Hope this helps.

    /Jan

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

    But seems like you have already done that according to https://our.umbraco.org/forum/developers/xslt/63222-Anchor-Tag-href-Problem

    So what is the current issue? What kind of markup is being removed now?

    /Jan

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 09:55
    Abdullah Anwar
    0

    Hi

     

    I am having the below setting in tinymce.config

     <validElements><![CDATA[*[*]]]></validElements>

    but still tinymce remove the tags from the HTML.

    <div class="avndExpWrap">
            <div class="heading">The Avendus Experience</div>
            <div class="galleryWrap">
            <div class="slick-slider">
              <div class="slick-slide">
              <div class="itemWrap">
              <a href="culture-lightbox.html" class="galleryLightBx fancybox.iframe">
              <div class="imgWrap"><img src="/img/avendus-exp-thumb1.jpg" alt=""></div>
              <div class="detlWrap">
              <strong>From the desk of Shrikant Bandaru</strong>
              <span>Principal, Alternative Asset Management</span>
              <p>"I am part of the small and closely knit Asset Management team that manages, through funds that we raise, third party money to makes investments in public equities…"</p>
              <p><a href="javascript:;">See More &raquo;</a></p>
              </div>
              </a>
              </div>
              </div>
              <div class="slick-slide">
              <div class="itemWrap">
              <a href="culture-lightbox.html" class="galleryLightBx fancybox.iframe">
              <div class="imgWrap"><img src="/img/avendus-exp-thumb2.jpg" alt=""></div>
              <div class="detlWrap">
              <strong>Let the games begin!</strong>
              <p>Team Avendus puts their skills to the test.</p>
              <p><a href="javascript:;">See More &raquo;</a></p>
              </div>
              </a>
              </div>
              </div>
              <div class="slick-slide">
              <div class="itemWrap">
              <a href="culture-lightbox.html" class="galleryLightBx fancybox.iframe">
              <div class="imgWrap"><img src="/img/avendus-exp-thumb3.jpg" alt=""></div>
              <div class="detlWrap">
              <strong>A day at Avendus</strong>
              <p>A sneak peek into our office</p>
              <p><a href="javascript:;">See More &raquo;</a></p>
              </div>
              </a>
              </div>
              </div>
              <div class="slick-slide">
              <div class="itemWrap">
              <a href="culture-lightbox.html" class="galleryLightBx fancybox.iframe">
              <div class="imgWrap"><img src="/img/avendus-exp-thumb1.jpg" alt=""></div>
              <div class="detlWrap">
              <strong>From the desk of Shrikant Bandaru</strong>
              <span>Principal, Alternative Asset Management</span>
              <p>"I am part of the small and closely knit Asset Management team that manages, through funds that we raise, third party money to makes investments in public equities…"</p>
              <p><a href="javascript:;">See More &raquo;</a></p>
              </div>
              </a>
              </div>
              </div>
            </div>
            </div>
            </div>

     

    when i post the above code some of the codes remove by the tinymce

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 10:04
    Abdullah Anwar
    0

    below mentioned tag is remove from the page

    <a href="culture-lightbox.html" class="galleryLightBx fancybox.iframe">

     

    I don't want this cleanup functionality of tinymce.

    How can we disbale.

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 10:40
    Craig O'Mahony
    0

    Hi Abdullah,

    If you look in the config/tinymceconfig.config file you'll see a list of what TinyMCE regards as valid HTML elements. You can amend this list to include the elements that are being stripped out.

    thanks,

    Craig

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 10:48
    Abdullah Anwar
    0

    i can not add the html tag everytime editor asked me to do that.

    Should be a generic solution for that.

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

    Hi Abdullah

    Gallery stuff really should not go in the RTE field. The RTE is only intended for text content. I suggest that you reconsider your approach and create a macro, which can be inserted into the rich text editor, which has a media picker as a parameter.

    That way the editor can insert the gallery in a certain context in the rich text editor and be able to pick either a folder containing images or some specific images depending on how you choose to do things.

    This is the proper way of doing it - The other way is an ugly hack and it was never intended for that kind of usage. The editor should not need to add that kind of tags either imho.

    /Jan

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 11:04
    Craig O'Mahony
    0

    I don't really see what the problem is adding tags as and when they come up but if really* want to allow any sort of markup then simply wildcard the <validElements> tag in the config file mentioned above so...

      <validElements>

        <![CDATA[*]]>

      </validElements>

    Then simply touch your normal web.config to reload and you should be able to enter whatever markup you or your editors wish to.

    *This is dangerous though as any sort of malicious scripts could be entered. If it was me I would enter the HTML tags as and when they come up but it's your solution.

    NOTE: I agree completely with Jan

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 11:48
    Abdullah Anwar
    0

    Can you please tell me how can i allow p tag under a tag similar to the following.

    <a href="/test"><p>test</p></a>

     

    What i have to add in valid elements for this.

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 11:52
    Abdullah Anwar
    0

    Can we use any other richtextbox in umbraco other than this to avoid this issue.

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 11:55
    Craig O'Mahony
    0

    Have you touched and resaved your web.config file? 

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 11:59
    Abdullah Anwar
    0

    yes i have resaved two three times.

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 12:15
    Craig O'Mahony
    0

    Well all I can say is that the steps below work fine for me.

    Amend the tinyMCEconfig adding a wildcard to the validelements section.

    Enter a space (or something) in the web.config and save it.

    Refresh the site 

    And you can enter whatever HTML you wish

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 12:56
    Abdullah Anwar
    0

    Have you tried to write the <a href="test"><p>test</p></a> in rich text editor

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 13:18
    Craig O'Mahony
    0

    Umbraco will strip that out as it's not really valid HTML in general. Why would you want to wrap an entire paragraph in an anchor link?

    Surely <p><a href="#">This is the link</a></p> is a more elegant way of acheiving that?

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 13:34
    Abdullah Anwar
    0

    i do not want that but it required by the editor.

    i can not restrict editor to don not add this tag,

    Can we use any other text editor

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 14:08
    Craig O'Mahony
    0

    It's still not valid HTML so I'd be asking why they want to do it.

    Yep, you can use other editors searching this site will provide examples of how to do it.

  • Abdullah Anwar 36 posts 56 karma points
    Mar 19, 2015 @ 14:14
    Abdullah Anwar
    0

    Can you please provide other editors link.

    So that we can use that we have to do that because my HTML team did this mistake in all the pages of the website.I do not have time to ask them to remove these tags.

  • Craig O'Mahony 364 posts 918 karma points
    Mar 19, 2015 @ 14:26
    Craig O'Mahony
    0

    Like I said just do an general internet/site search. What you can use and how to configure depends on your envirnoment and you're best placed to know what instructions relate to you.

  • Craig O'Mahony 364 posts 918 karma points
    Mar 20, 2015 @ 16:15
    Craig O'Mahony
    0

    No need to thank us by the way

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

    To allow a <p> inside an <a> within the rich text editor, add the following to tinyMceConfig.config in the <customConfig> section:

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

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

  • Richard Hamilton 79 posts 169 karma points
    Nov 08, 2018 @ 11:04
    Richard Hamilton
    0

    Just a quick tip when adding these... As its javascript on the editor which strips the html you may need to hard refresh the browser too for the settings to take effect.

Please Sign in or register to post replies

Write your reply to:

Draft