2024-05-19, 09:00 AM
(2024-05-18, 10:35 PM)effone Wrote: Example js:
// Add SCEditor Command $.sceditor.command.set('custom_insert_code', { exec: custom_insert_code_sce, txtExec: custom_insert_code_sce, tooltip: "Insert Code" }); // SCEditor Driver function custom_insert_code_sce() { var code = custom_insert_code(); if (false !== code) { this.insert('[php]' + code + '[/php]'); } } // Custom Function function custom_insert_code() { return "console.log('Success!)"; }
Use CSS to insert the icon in the custom button.
Thank you!