MyBB Community Forums
I added table options in my codebuttons toolbar , not working - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: I added table options in my codebuttons toolbar , not working (/thread-238584.html)



I added table options in my codebuttons toolbar , not working - PARADOX987 - 2023-06-21

I have added table options in codebuttons toolbar, and as expected the icon also appears in text editor
but i was expecting that it will be work as they works in sceditor.com but unfortunately the was unclickable.

i update my sceditor javascripts to newer version that updated in sceditor.com to check if it is working now , but no, it's not working, still there is a unclickable table icon in text editor

how to make it work please help me .


RE: I added table options in my codebuttons toolbar , not working - Schnapsnase - 2023-06-21

In /jscripts/bbcodes_sceditor.js search for:
// Remove last bits of table, superscript/subscript, youtube and ltr/rtl support
$.sceditor.command
    .remove('table').remove('subscript').remove('superscript').remove('youtube').remove('ltr').remove('rtl');
 
$.sceditor.formats.bbcode
    .remove('table').remove('tr').remove('th').remove('td').remove('sub').remove('sup').remove('youtube').remove('ltr').remove('rtl');

and replace with:
// Remove last bits of table, superscript/subscript, youtube and ltr/rtl support
$.sceditor.command
    .remove('subscript').remove('superscript').remove('youtube').remove('ltr').remove('rtl');
 
$.sceditor.formats.bbcode
    .remove('sub').remove('sup').remove('youtube').remove('ltr').remove('rtl');

Now you must create mycodes in ACP for table, table-head, table-row and table-data.
That's all. Wink


RE: I added table options in my codebuttons toolbar , not working - PARADOX987 - 2023-06-21

(2023-06-21, 07:01 AM)Schnapsnase Wrote: In /jscripts/bbcodes_sceditor.js search for:
// Remove last bits of table, superscript/subscript, youtube and ltr/rtl support
$.sceditor.command
    .remove('table').remove('subscript').remove('superscript').remove('youtube').remove('ltr').remove('rtl');
 
$.sceditor.formats.bbcode
    .remove('table').remove('tr').remove('th').remove('td').remove('sub').remove('sup').remove('youtube').remove('ltr').remove('rtl');

and replace with:
// Remove last bits of table, superscript/subscript, youtube and ltr/rtl support
$.sceditor.command
    .remove('subscript').remove('superscript').remove('youtube').remove('ltr').remove('rtl');
 
$.sceditor.formats.bbcode
    .remove('sub').remove('sup').remove('youtube').remove('ltr').remove('rtl');

Now you must create mycodes in ACP for table, table-head, table-row and table-data.
That's all. Wink

Thanks it worked.