TinyMCE Quattro and its wysiwyg bbcodes

TinyMCE Quattro and its wysiwyg bbcodes 2.7.2

No permission to download
With Xenforo 1.3.1, I'm having a similar issues on Desktop IE11. Clicking the "reply" or "Insert Quotes" for multi-quotes fails.

I'm not sure how to debug the line, which appears to be failing only in IE, in the file retro_quickreply.js;
Code:
ed.execCommand('insertHtml', false, ajaxData.quoteHtml);
No, that issue is not similar. I think it has been corrected on Github about 2 months ago but I haven't released the update yet. The exeCommand "insertHtml" is a TinyMCE internal function and must not be used (source : TinyMCE main developer). So you can update your version with the one available on Github (the only reason it has not be published here was there were not many modifications) or if you prefere, you can only replace the retro_quickreply.js file with the one available here.

I've tested the addon on my forum and I see that this version of tinymce miss some desired functions of the original full tinymce editor i can see here:
http://skin.tinymce.com

how is it possible to implement the other original functions too?
Most functions have already been implemented. I personally don't need the remaining ones.
 
  • Like
Reactions: Xon
How do you get the accordion and other sliders to work, at the moment I get:
[article]Test article in page[/article]
[accordion]
{slide}This is slide 1, a word slide{/slide}
{slide}
favicons
http://fc03.deviantart.net/fs71/i/2011/303/9/9/emma_watson_1_by_hong_yu-d4eirsy.jpg{/slide}

{slide}<img src="
favicons
http://fc03.deviantart.net/fs71/i/2011/303/9/9/emma_watson_1_by_hong_yu-d4eirsy.jpg
" alt="TAG TAG TAG">{/slide}
[/accordion]
[spoilerbb]test[/spoilerbb]
 
hello,
well i ended up adding the "XenForo_ViewPublic_Helper_Editor::supportsRichTextEditor()" from xf 1.3 in my core so now rich editor is properly activated for mobile devices that support it.
I guess you dont need to worry about that problem since most people dont run such a old xenforo base.
 
I'm seeing a string of errors popping up in my logs. XF 1.3.1 TinyMCE Quattro 2.1.2

Code:
Undefined index: type Yesterday at 3:14 PM - library/Sedo/TinyQuattro/ControllerPublic/Editor.php:61

Detailed info:

ErrorException: Undefined index: hash - library/Sedo/TinyQuattro/ControllerPublic/Editor.php:61
Generated By: jacobplm, Yesterday at 3:14 PM

#0 /var/www/sites/sufficientvelocity.com/html/library/Sedo/TinyQuattro/ControllerPublic/Editor.php(61): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/sites/...', 61, Array)
#1 /var/www/sites/sufficientvelocity.com/html/library/XenForo/FrontController.php(347): Sedo_TinyQuattro_ControllerPublic_Editor->actionQuattroDialog()
#2 /var/www/sites/sufficientvelocity.com/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /var/www/sites/sufficientvelocity.com/html/index.php(13): XenForo_FrontController->run()
#4 {main}

array(3) {
["url"] => string(68) "http://forums.sufficientvelocity.com/index.php?editor/quattro-dialog"
["_GET"] => array(1) {
["editor/quattro-dialog"] => string(0) ""
}
["_POST"] => array(0) {
}
}

I have this same error for id and hash as well.
 
@Ferdinand
See this (Bbm) then this (Bbm extension). Don't forget to import the Bb Codes Xml file (from the Bbm extension using the Bbm)

@HotCopper
Strange, I don't think I've used the function (supportsRichTextEditor), but I might need to check if it'called from a XenForo parent function that is only available in recent XenForo versions.

@Isil`Zha
I've never had this error before, but I will add a check routine to prevent it. Thanks.
Edit: it's because, the page (view) is not meant to be accessed directly but only by ajax.
Edit 2: fixed - I will released a new version on Github this weekend once I've upgraded to the last version of TinyMCE.
Edit 3: uploaded to Github with the last version of Mce - still needs to check the fonts (might have been modified) + needs to test on a liveboard
 
Last edited:
@Ferdinand
See this (Bbm) then this (Bbm extension). Don't forget to import the Bb Codes Xml file (from the Bbm extension using the Bbm)

I've installed: http://xenforo.com/community/resources/bbcodes-buttons-manager.1731/
and http://xenforo.com/community/resources/bbcodes-buttons-manager-advanced-bb-codes-pack.1428/

I've also imported all the bb codes xml into; admin.php?bbm-bbcodes/

I end up with this on that page
Code:
Bbm BB Codes
   Prefix match  Bbm BB Codes
Delete...
Controls
Orphan button
[BBM] Slides button
Delete...
Controls
Orphan button
[BBM] Highlight Helper
Delete...
Controls
[BBM] ACCORDION
Delete...
Controls
[BBM] ARTICLE
Delete...
Controls
[BBM] BIMG
Delete...
Controls
[BBM] ENCADRE
Delete...
Controls
[BBM] FIELDSET
Delete...
Controls
[BBM] GVIEW
Delete...
Controls
[BBM] LATEX
Delete...
Controls
[BBM] PICASA
Delete...
Controls
[BBM] SLIDER
Delete...
Controls
[BBM] SPOILERBB
Delete...
Controls
[BBM] TABS

And I just get the actual code not the accordion ect, I think the script to make the bb codes is not installing.

If I try to bulk import the bb codes into /admin.php?bb-codes/ I get "Please provide a valid BB code XML file."

Many thanks.
 
@cclaerhout
hey,
you do not call it in the add-on but it is used to populate the $messageHtml variable.
So if you want to edit a message with the wysiwyg editor but $messageHtml is empty (because if $showWysiwyg is false it doesnt get computed) you won't see anything.
J'espere que je suis clair! ;)
 
Is there any way to improve the performance of the table bbcode parsing for display?

I had a user paste in ~8000 lines of table in (~8000 {td} and 500 {tr} from http://www.mongabay.com/cities_urban_01.htm) , and it causes the pages to timeout after ~30 seconds.

It times out when displaying the post in Sedo_TinyQuattro_Helper_MiniParser around here:
Code:
protected function _buildTree()
{
$nodes = array();
$i = 0;
while (($value = array_shift($this->_matches)) !== NULL)

One optimization would be to replace array_shift as it will renumber arrays:
http://stackoverflow.com/questions/2735211/alternative-to-array-shift-function
 
Last edited:
@Xon
Whaou, I've never tried a table with 8000 lines... Did you try the optimization on the code yourself, did it work ? I don't have time to spend too much time on this now, so if you could try the optimization and share the code if it works (on Github) it would be nice. Otherwise, send me an example with such a huge table and, I don't promise anything, but I will see if I can find some time to have a look.
 
Is there any way to disable to smilie modal, so when a member wants to insert a smilie, they just have to click the Smilie link?

A lot of members didn't realize that is you click the Smilie link, they will load below the editor. They thought the modal window was all the smilies we had.

I want them to just click Insert->Smilies.

Thanks, this is a very nice resource.
 
Thanks for this nice plugin.
How can I create an unordered list bbcode and add class to it.
somthing like:

<ul class="name">
</ul>
 
@cclaerhout

Github pull request with a performance fix for large tables. The table from http://www.mongabay.com/cities_urban_01.htm went from being unrenderable with a 30 second timeout limit to rendering in under ~2.5 seconds
Thanks a lot ! I should have a few days for me this week and will look at it.

Thanks for this nice plugin.
How can I create an unordered list bbcode and add class to it.
somthing like:

<ul class="name">
</ul>
That question is not related to this addon. If you want a wysiwyg list, it's already there by default on XenForo (Wysiwyg=>Bb Code | Bb Code => Wysiwyg | Bb Code => Html [Bb Code formater]) ; if you want to add a class, you will have to modify the Base formater (check this class : class XenForo_BbCode_Formatter_Base and these functions : renderTagList & _renderListOutput). But depending on your needs, you might simply create a css targeting the lists in messages ; for ie: .messageText.baseHtml ul{ }. But for more information, ask directly to XenForo developers.
 
Ok, sorry, you are right, its a general question,I know there is already a list in the editor. my goal was to customize specific lists differently by css, and I thought tinymce may provide a diffrent way to do this.
Thanks your information was helpful.
 
Have two questions:
I'm using the RTL editor, but buttons still aligned on the left, is this normal?

Captura.webp
Is it possible to replace the default TinyMce buttons icons with simple text? I know this is possible when adding new buttons, but how about the default ones?
Thanks
 
Have two questions:
I'm using the RTL editor, but buttons still aligned on the left, is this normal?

View attachment 74458
Is it possible to replace the default TinyMce buttons icons with simple text? I know this is possible when adding new buttons, but how about the default ones?
Thanks
  • First comment : the skin I've made for XenForo shouldn't be enabled with the RTL mode... I'm not sure why you got it. Check the 5th paragraph of the FAQ to use the original skin (explanation #663 - can be configured by theme if needed).
  • The TinyMCE RTL mode still aligns buttons on the left. It seems the default behaviour.
  • Yes it's possible to do that, but you will have to modify some code in some JavaScript files (the button type must be changed, then a phrase must be created). I will not support this.
 
I've had some users report that Firefox 29.x.x has the copy & paste in inline/quick reply mode with TinyMCE mess up and stripping whitespace.

The dedicated reply window apparently works.

:edit: And the preview window on a new thread sporadically doesn't work right either.
 
Last edited:
I've had some users report that Firefox 29.x.x has the copy & paste in inline/quick reply mode with TinyMCE mess up and stripping whitespace.

The dedicated reply window apparently works.

:edit: And the preview window on a new thread sporadically doesn't work right either.
I will check but this is strange. I'm using Firefox on my forums everyday and never had a problem with the TinyMCE paste function.
 
I've had some users report that Firefox 29.x.x has the copy & paste in inline/quick reply mode with TinyMCE mess up and stripping whitespace.

The dedicated reply window apparently works.

:edit: And the preview window on a new thread sporadically doesn't work right either.

Well to be fair, the last report says he restarted FF and it worked just fine. I'm on the same version and couldn't replicate the behavior. I gave instructions on restarting FF in safe mode should the problem re-emerge to see if it's an add-on causing the trouble.
 
Back
Top Bottom