A
A
Anna S.2021-12-17 09:46:52
CKEditor
Anna S., 2021-12-17 09:46:52

How to change data in dialog ckeditor?

Good afternoon!
I created my plugin with a dialog (modal) window that displays a list of possible fields and the Add field button.
61bc30907fc9c650271121.jpeg
After adding a field (the dialog closes, an additional modal opens and then the data goes to the server), I need the new field to be added to the dialog of this plugin as a new item in the list of fields.
In the view for adding fields, I update the data of the editor config, pass a new list of fields to them, set the parameter that there are updates:

CKEDITOR.instances["node-content"].config.addfield_fields2 = newfields;
 CKEDITOR.instances["node-content"].config.addfield_fields_new = "new";

but at the same time I can not reload the data of this plugin and its dialog. How do I display new data when opening a plugin dialog?
The only place where I get when I re-init the plugin is in the onShow method, but how can I re-build the dialog data structure in it then?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question