suneditor icon indicating copy to clipboard operation
suneditor copied to clipboard

Create Popout menu when clicking on spans with certain class

Open sdraper69 opened this issue 2 years ago • 1 comments

When you insert a link and click on it in the editor you get a handy little pop-up

image

Is there a way to create a popup like this, with custom buttons, for custom inserted text?

For example, I can insert metadata

My favourite day of the week is becuase I have PE at school.

It would be great if when the user clicks within the metaData tag (e.g. the word Wednesday) a popup appears which has some custom buttons on.

Is this possible?

sdraper69 avatar May 27 '22 08:05 sdraper69

It is possible, but the method would be complicated. You can refer to the file below and implement it in your "click" event. https://github.com/JiHong88/SunEditor/blob/master/src/plugins/dialog/link.js#L78

JiHong88 avatar May 28 '22 14:05 JiHong88