admin管理员组

文章数量:1125602

It seems to me that there must be a solution, but I haven't found it. During the theme development process, we create many shortcodes for inserting unusual html layouts into the text.

It would be great to know a way how to add a button to the editor panel that would allow user to fill in the parameters and insert a shortcode into the text without having to “remember” its structure.

So let's say we have this sort of shortcode:

[shortcode_name attr1="" attr2="" attr3=""]TEXT[/shortcode]

And I want to add button to WYSIWYG, specify its icon and when user click it should show popup with three input fields for attr1-3.

Maybe someone has a ready-made code or knows a suitable plugin? Thanks a lot!

本文标签: tinymceHow to add button to WYSIWYG to insert shortcode with params (filled in system popup)