ckeditor / strapi-plugin-ckeditor

CKEditor 5 - Official Integration for Strapi
https://market.strapi.io/plugins/@ckeditor-strapi-plugin-ckeditor
Other
71 stars 80 forks source link

Source Editing Plugin not working. #49

Open Qavi-Nizamani opened 1 year ago

Qavi-Nizamani commented 1 year ago

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

supercede commented 1 year ago

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?

Qavi-Nizamani commented 1 year ago

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.

supercede commented 1 year ago

Thank you

Kalgros20 commented 1 year ago

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

sanhtranquoc commented 1 year ago

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
                        },
                    ]
                }
            }
        }
    },
JenusDong commented 12 months ago

"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 commented 11 months ago

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

nishk02 commented 8 months ago

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