wp_back/wp-content/plugins/easy-table-of-contents/assets/js/toc-mce-button.js

12 lines
457 B
JavaScript
Raw Permalink Normal View History

2024-05-20 15:37:46 +03:00
(function() {
tinymce.PluginManager.add('toc_mce_button', function( editor, url ) {
editor.addButton('toc_mce_button', {
text: 'TOC',
icon: false,
onclick: function() {
// change the shortcode as per your requirement
editor.insertContent('[ez-toc]');
}
});
});
})();