• Login
  • Register

DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

CKEditor removing tags

You are not authorized to post a reply.
Sort:
Page 1 of 212 > >>


New Member


Posts:8
New Member

    I have a html module which contains  a div with just an id and nothing else  i.e. {looks like this editor as removed my div example}

    this works fine on my Live site using RadEditor (DNN 8.00.04)

     

    I've a test site running DNN 9.03.02 which CKEditor, this doesn't display the

    when the module is loaded, and removes it if i re-enter it via the SOURCE option and then switch back to main view.

     

    I've tried set AllowedContent to true in the CKEditor Provider Settings screen.

    I also installed the latest version of CKEditor from https://github.com/w8tcha/dnnckeditor/releases and also have the same problem, as anybody resolved this.

    I also installed version 2.1.20 onto my Live site DNN 8, as this seems to be the last version which includes a version for DNN8 , still the same problem.

    I'd like to upgrade my Live site to DNN 9, but i need to resolve the problem first.

    I need an editor which doesn't change my html code after entering it.

     

     

     



    Veteran Member


    Posts:813
    Veteran Member

      As you are the third person asking about this in about a week, I wrote a blog post about the "issue".
      https://dnncommunity.org/blogs/Post/2841

      HTH Timo



      New Member


      Posts:8
      New Member

        Thanks for the reply, but its still not working, i have tried with AllowedContent set to true and also false, and with ExtraAllowedContent set to *[*];

        My test is to click on [Source] enter the simply div command with an id, then click on Source again, then Source again and the div code as vanished.



        Veteran Member


        Posts:813
        Veteran Member

          I just tested this using:

          extraAllowedContent = div(*);div{*}

          And this HTML and it seems to work ok.

          < div class="test">test < /div>
          < div id="test">test < /div>



          New Member


          Posts:8
          New Member

            < div id="ab" >test < /div > does work

            but
            < div id="ab" > < /div > doesn't
            nor does
            < div id="ab" >   < /div>

            I would have expected Allowedcontent = true to allow any entry and not do any formatting.

            Currently i have some modules whose content is

            < div id="ab" > < /div >

            as these are populated by javascript, with this cuurent formatting option, i will need to change back to radeditor so that i can amend them prior to switching to ckeditor, otherwise i will lose the content.



            Veteran Member


            Posts:813
            Veteran Member

              Ok, that's another issue, that's empty tag stripping.

              I think you need an extra cofiuration for that along this line: https://ckeditor.com/old/forums/Sup...-topic-top

              I'll try that later today and see if I can get it to work.


              BTW:
              I would strongly advise you to not use the editor for these kind of scenarios.
              I don't know exactly what you are trying to accomplish, but inserting empty DIV elements is much easier en better to manage using a  structured content module like Open Content (or 2SXC). You can post what you want to do on the dicussions tab and we'll help determine if it feasable to use OC and to get you started.



              New Member


              Posts:8
              New Member

                The div is used to insert a ClickDimensions form as a widget, example

                < div pageID="4q5bzpfeeipaaaisazzzz" > < /div >


                New Member


                Posts:3
                New Member

                  Possible Solution - Use Chrome

                  Hi,
                  I know this is an old thread but just in case someone else is still looking for a (different) solution...

                  I had the same problem: HTML tags were stripped from my code in the editor (but they were still processed and to be found in the db, table "HtmlText"). I followed any suggestion I could find in these forums (in HTML Editor Manager, setting AllowedContent to true and/or changing the config files and/or removing other modules from the pages that may interfere, logging in as superuser vs siteadmin)... nothing helped.
                  The solution I found (after approx. 12 hours of frustrating research and trial and error) was as simple as this: When correctly setting AllowedContent to true, Firefox and Internet Explorer both continue to strip the tags. Only Chrome displays the tags (I haven't tried out Edge).

                  Hope that may help someone.
                  Britta



                  Veteran Member


                  Posts:813
                  Veteran Member

                    Well that's very strange, as I'm using this with Firefox and it works as expected (see the previousy mentioned blog post about CkEditor stripping HTML)



                    New Member


                    Posts:3
                    New Member

                      Timo,

                      thanks for your feedback and also for your blog post that I had read and followed before.

                      This is indeed strange that it works for you in Firefox but it doesn't for me. So there must be something else going wrong in my DNN website. Until I find out what that is, I am just happy that I was able to upgrade to 9.9.0 and remove Telerik - even if that means that for right now, I can only use Chrome for the handful of modules where I do use HTML tags that would otherwise be stripped.

                      Best, Britta

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      4. No Flaming or Trolling.
                      5. No Profanity, Racism, or Prejudice.
                      6. Site Moderators have the final word on approving / removing a thread or post or comment.
                      7. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved