![]() |
How to add icon to insert bbtag around some text.
1 Attachment(s)
I want to add some custom icons (like [superscript], [subscript]) to editor toolbar, and have them clickable, some bbcode [sub] or [sup] will wrap around the selected text.
In WYSIWYG, it should display the text as superscript or subscript. base on kirby's file, I have the code added https://vborg.vbsupport.ru/showthread.php?t=83268 In editor_toolbar_on template, I have the icon added HTML Code:
<td><div class="imagebutton" id="{$editorid}_cmd_subscript"><img src="$stylevar[imgdir_editor]/subscript.gif" width="21" height="20" alt="subscript" /></div></td> If I switch to standard editor, the icon is not clickable. How can I make it so that when I click on the icon, [sub] [/sub] will wrap around some selected text? PS. Adding custom BBCode in admincp just wrap the [sub] around selected text, but not display them as designed in WYSIWYG mode ......... :) got it. In vbulletin_textedit, I need to add case 'subscript': case 'superscript': { this.wrap_tags(cmd.substr(0, 3), false); return; } above case 'justifyleft': case 'justifycenter': Dont know if there's another way to do it :) |
All times are GMT. The time now is 03:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|