The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom bbcode and WYSIWYG editor...again!
I've scoured this forum and seen the question asked several times, but never satisfactorily answered: How do you get a simple custom bbcode to render properly in the WYSIWYG editor? I'm using a patched vB 3.6.4, and I'm just trying to add two simple text formatting tools--strikethrough and superscript.
If I add icons via the BB Code Manager--the "approved" way of doing it--the code properly renders the formatted text in the posted message, but shows up as raw tags in the WYSIWYG editor, which irks and confuses my users. If I add the icons manually in the editor template, the code properly renders the formatted text in the WYSIWYG editor, but is stripped out of the posted message entirely. Surely there must be some relatively easy hack to a PHP or JS file that will get it to look right in both places! I've figured out every other vB development problem I've had, but I can't seem to crack this one. Any ideas? |
#2
|
||||
|
||||
This is just a "me too" ... can't help you, but I have exactly the same problem, and am actively working on finding a solution. If you do happen to work this out, please follow up with whatever you come up with. I'll do the same if I can find a maintainable solution (i.e. hook based, no code edits).
-- hugh [vborg keeps merging this post with my first one for some reaosn, trying again] Well, as far as I can tell, the reason is in append_custom_tags(), where it does this: PHP Code:
And unfortunately I've yet to find a hook which will enable me to override that, although I'm still looking. I'm intreagued by your statement that "If I add the icons manually in the editor template, the code properly renders the formatted text in the WYSIWYG editor", which I haven't investigated yet. From my reading of the code, I'm not quite sure how or why that would work, but if it does ... I'll try and work out how and why! [edit - looks like might be able to do something with the 'bbcode_create' hook for setting the callback function] Going back the other way (from WYSIWYG to bbcode) there seems to be a hook (wysiwyg_parse_complete) where I could call the standard parse_wysiwyg_recurse() on a custom parse_wysiwyg_mybbcode() function. If I don't find anything, I guess our only choice is to start beating up on the developers either for a new hook, or to finish the "until custom tags are updated to the new format" stuff! -- hugh |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|