1
votes

I am creating a ckeditor plugin, I realize that the default ckeditor plugins have the ability to reopen the edit dialog after you create it. For example you insert a table or a link, if you double click on the new created table or link, the table dialog will open again so that you can change its attributes. Does anyone know what need to be done to make the plugin can also reopen the dialog if I click on the created content? Thank you.

1

1 Answers

1
votes

Set a listener for the doubleclick event and adjust the data.dialog value if it's on your element.

If you want to learn more, read their documentation as this should be explained among the guides that they provide.

    editor.on( 'doubleclick', function( evt )
        {
            var element = evt.data.element;
            if ( element.is( 'img' ) )
                evt.data.dialog = 'mydialog';
        });