DNN Forums

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

CKEditor - HTML Encoding

Sort:
You are not authorized to post a reply.





New Around Here





    Hi Everyone

    After some fun I have finally built my first custom module, I have leveraged the DNN CKEditor which seems to work well until I start testing it using real world scenarios.

    I copy and paste some well formed HTML into the editor and it encodes all of the html tags. eg in source I enter hi which gets saved as  <b>hi</b>

    After researching this seems to be well complained about behaviour with no option to truely tell CKEditor to leave the html alone. Wiht Telerik Editor there was a html property to extract and populate the control with html. I cant find a similar property with the DNN CKEditor control. 

    Configurations I have tried with no success:

    • (Advanced Content Filter) allowedContent = true
    • basicelement = false
    • entities = false

    Is there a way to tell CKEditor to leave the HTML alone?

    Thanks






    New Around Here





      There seems to be a solution as my simple bold tag displays as expected when injected into the DNN forum page, which I assume is using the CKEditor?

      Cheers






      New Around Here





        So it seems the answer is HtmlEncode = false, the setting does not work through the editor configurator under sites.
        I altered the editor property through the control tag in the page and things are now working as expected.

        Well that took a while :)






        Advanced Member





          You set the AllowedContent setting to true in the HTML Editor Config Manager, like in this screenshot below?  Doing that for me made me able to include any markup I tried inside an HTML module.

          HTML Editor Config Manager screenshot

          DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase





          Advanced Member





            You may also want to look at the extraAllowedContent setting.

            DNN partner specializing in custom, enterprise DNN development https://engagesoftware.com/showcase
            You are not authorized to post a reply.

            These Forums are dedicated to the 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. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
            2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
            3. 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.
            4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
            5. No Flaming or Trolling.
            6. No Profanity, Racism, or Prejudice.
            7. Site Moderators have the final word on approving / removing a thread or post or comment.
            8. 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