Announcement

Collapse
No announcement yet.

WYSIWYG when insert html the head and meta not save

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WYSIWYG when insert html the head and meta not save

    Hi, Everybody. WYSIWYG when insert html the head and meta not save. Only save the body. Thank you in advance

  • #2
    Hi, I think, there is no solution. The editor strips a lot of Tags and Code. See here: https://forum.espocrm.com/forum/gene...ustom-template

    Comment


    • Riad
      Riad commented
      Editing a comment
      Thank you very much

  • #3
    Supposedly CKEditor work quite well with EspoCRM, so you can give that a try when you do editing.

    Personally I test out to create a template, and in term of function the online editor provide it is still quite limited so I stopped playing with it, maybe the installation version is better I don't know

    Here is an online editor: https://onlinehtmleditor.dev/
    And if you want to install it yourself:https://ckeditor.com/ckeditor-5/

    I played with CKEditor for about 25 minutes so I might have missed out on what it can truly do.

    Comment


    • #4
      In the past i was working with my partner on adjusting wysiwyg editor. And there is a parameter which is responsible for removing tags. I can't remember where it was unfortunatelly

      Comment


      • #5
        emillod and @Riad,

        I did a bit searching and based on the last post I found the place, where the HTML is stripped out.

        Go to

        client/lib/summernote.min.js

        find two instances of

        Code:
        prettifyHTML
        Delete them. After that the editor does not strip anything anymore.

        I did not yet test that thoroughly, so I don`t know, if it could affect in any negative way at any moment. Unfortunately there does not seem to be a possibility to set that function to false/true anywhere.
        As well it might not be update safe.

        Anybody could confirm, that tis will not be damaging anything? I am not skilled in Javascript.

        Edit: testing further, it still strips HTML header tags
        Last edited by shalmaxb; 08-31-2021, 08:57 AM.

        Comment


        • #6
          From my searching, I guess we could solve that problem by integrating codemirror in summernote. But as already written I do not have the skills for that. Anybody could help with that?

          Comment


          • #7
            Thank you all for your responding @shalmaxb @emillod @espcrm

            Comment


            • #8
              The problem is with the WYSIWYG renderer as mentioned. The out of the box config for magento is set when saving, to reset the page view back to the WYSIWYG view and that's when your code gets rewritten.

              A real nasty hack is to disable the render or set it to default to html in the config menu.

              Comment

              Working...
              X