strapi-plugin-ckeditor icon indicating copy to clipboard operation
strapi-plugin-ckeditor copied to clipboard

Source Editing Plugin not working.

Open Qavi-Nizamani opened this issue 2 years ago • 8 comments

I have cloned the repository, and added the plugin as custom field everything is working as expected. And installed the ckeditor5-source-editing plugin, it enables me to edit the HTML, but on save the changes are reverted. I cannot even add a single attribute to a <p> tag e.g., <p class="test">, it reverts to normal <p> tag

Qavi-Nizamani avatar Mar 10 '23 12:03 Qavi-Nizamani

I have cloned the repository, and added the plugin as custom field everything is working as expected. And installed the ckeditor5-source-editing plugin, it enables me to edit the HTML, but on save the changes are reverted. I cannot even add a single attribute to a <p> tag e.g., <p class="test">, it reverts to normal <p> tag

I am experiencing the same thing. How did you resolve this please?

supercede avatar Apr 11 '23 13:04 supercede

I have cloned the repository, and added the plugin as custom field everything is working as expected. And installed the ckeditor5-source-editing plugin, it enables me to edit the HTML, but on save the changes are reverted. I cannot even add a single attribute to a <p> tag e.g., <p class="test">, it reverts to normal <p> tag

I am experiencing the same thing. How did you resolve this please?

I migrated to tinyMCE text editor, to meet the specific needs.

Qavi-Nizamani avatar Apr 13 '23 13:04 Qavi-Nizamani

Thank you

supercede avatar Apr 13 '23 19:04 supercede

Same issue here. There's a way to add a custom Class and in the Strapi API, the string comes with the class?

Kalgros20 avatar Sep 08 '23 19:09 Kalgros20

This error comes from a missing setting for the editor, you can try to update the setting to make the edit field will not revert (class and inline css.).

Path: /config/plugins.js Add:

ckeditor: {
        enabled: true,
        config:{
            editor:{ 
                htmlSupport: {
                    allow: [
                        {
                            name: /.*/,
                            attributes: true,
                            classes: true,
                            styles: true
                        },
                        {
                            name: 'div',
                            attributes: true,
                            classes: true,
                            styles: true
                        },
                        {
                            name: 'p',
                            attributes: true,
                            classes: true,
                            styles: true
                        },
                    ]
                }
            }
        }
    },

sanhtranquoc avatar Nov 10 '23 08:11 sanhtranquoc

"And installed the ckeditor5-source-editing plugin" : How to implement this? after cloning this repository, and adding "ckeditor5-source-editing" dependency, UI of source editing does not appear in the editor5. Please help. Is your strapi version v4? and strapi-plugin-ckeditor5-with-source-editing only support v3.

JenusDong avatar Dec 03 '23 07:12 JenusDong

@sanhtranquoc following your setting, but not work when source editing reverted. Please help me, thanks.

JenusDong avatar Jan 03 '24 11:01 JenusDong

Hi. Kind request can you provide option to add source editing option atleast to "Rich text" editing option?

nishk02 avatar Mar 31 '24 06:03 nishk02