ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.54k stars 3.7k forks source link

Not able to add an icon in editor body as collapsable text. #15746

Open sakib8382 opened 9 months ago

sakib8382 commented 9 months ago

📝 Ask a question

Hi all, I'm not able to add an icon which triggers a function to collapse and Un collapse the text in the editor body.

sakib8382 commented 9 months ago

@CKEditorCLA
we are trying to achieve the create the custom tag by adding in the schema. ckeditor error

it returns the normal data only in

tag image

Please suggest how can we achieve the custom tag creation functinality

Witoso commented 9 months ago

Hi @sakib8382, I apologize, but I don't understand what you're trying to achieve, what you mean by icon or custom tag, could you explain it a bit deeper?

sakib8382 commented 9 months ago

HI @Witoso , I'm trying to implement the functionality for creating a section by selecting 2 or more than 2 lines from the editor. it creates a section when we click on the button. we have written two paragraphs in editor body and select the add section button which is created in CKEditor4. image .it convert the selected paragraph into the toggle section with icon. When we click on title or icon it shows and hide the content. image

image

https://github.com/ckeditor/ckeditor5/assets/117921698/bd686ad2-18c6-4fd2-b125-e76d31195cb4

We tried to implement the same functionality in CKEditor 5 by registering the custom tag in the registry, but it does not work properly. Also, the data that we have added in our custom tag is shown in only in

tag. Could you please suggest any other approach if mine is not correct.