TinyMCE Fix (NO MORE SUPPORTED)

TinyMCE Fix (NO MORE SUPPORTED) 0.7.1

No permission to download
confirmed: the bug is not from the add-on is from cashing some js files. I was able to resolve the issue by creating a new chrome user (y)
 
Cedric, I had some time and updated the addon. Can you use [prebreak][/prebreak] while the "pollution fix" enabled? I added that also to the field in the settings section but when I switch from WYSIWYG editor to plain the tag disappears and doesn't show up in the post.
 
I'm writing from my mobile now, as I said before I added a cleaner for empty bbcode tags (I think I've seen some appearing after a fix, but I must try again with the new code). I will make a test later (if i don't want my wife to kill me it will be on Tuesday ). May I ask what is the purpose of that bbcode ? Why is it empty ?
Thanks for the feedback.
 
I'm writing from my mobile now, as I said before I added a cleaner for empty bbcode tags (I think I've seen some appearing after a fix, but I must try again with the new code). I will make a test later (if i don't want my wife to kill me it will be on Tuesday ). May I ask what is the purpose of that bbcode ? Why is it empty ?
Thanks for the feedback.

It's XenPorta's page break bb code. With it, you can trim a content that is going to be showed on the front page of the portal.
 
I know now why I decided to delete empty bbcodes, it's another problem with the XenForo Parser

Take that code:
Code:
[quote]
aaaa
bbbb
cccc
[/quote]

Apply a global center align inside TinyMCE
Go to the "normal editor"
Go back to TinyMCE

An empty
Code:
[quote][/quote]
has appeared


But the solution to clean empty bbcodes tags is not the best, because that bug can also generate not empty bbcodes tags:
Do the same procedure as above but with that code:
Code:
[quote]aaaa
bbbb
cccc
[/quote]

I'm not sure there is a solution here. I will think about it later.





Edit1: after some test, it seems that the actual fix is working (even without deleting empty tags) with the examples above, but if i put another align inside the quote bbcodes (for example if I do a global center align to the quote but I chose to perform a right align to the lines with A) the fix is lost.
 
I thought I had found a solution with the BbCode parser... but it's worthless. The XenForo html parser seems to have a problem too:
Try this code
Code:
[CENTER][B]
[quote]aaaaa
[LEFT][B]bbbbb[/B][/LEFT]
cccccc
[quote]eeeeee[/quote]
[RIGHT][B]dddddd[/B][/RIGHT]
[/quote]
[/B][/CENTER]
=> it will not stay the same :(
 
I know I lot of people use XenPorta, but respectfully, I would prefer this not to be designed around it.

I've seen some very cool add-ons and modifications turn into cr*p trying to satisfy or resolve around XenPorta.

The problem is not your code. You've done a wonderful and outstanding job. The problem is with XenPorta.... Please do not try to fix it through the editor. Let and encourage the developer of XenPorta fix XenPorta
 
  • Like
Reactions: HWS
It's not a problem with XenPorta but it's a problem with XenForo Html parser which is working line by line and not bbcode per bbcode.
 
A quick update:
I've found a solution for previous XenForo Parser "bugs" (not really bugs but lakes) described in posts 105-106. The solution used is a "pre-parser" when the editor converts from Bb Codes to Html. This "pre-parser" is working line by line and creates an artificial tags pollution for TinyMCE (a nightmare to code).

This pre-parser must also convert some XenForo Wysiwyg Bb Codes (I still need to check that list) before the html parser (for ie: [ quote ] =>[ fixTiny_quote ]) then to convert it back after the html parser (for ie[ fixTiny_quote ] => [ quote ] ). It will kill the Wysiwyg... but there is not Wysiwyg with some Bb Codes. I still need to perform tests on this part.

Another bug found with the XenForo Parser:
1) Example 1
From Bb Code editor:
Code:
[CENTER]
[LIST]
[*]dzzad
[*]dzad
[*]dzdzad
[*]zdzad
[/LIST]
[/CENTER]
To TinyMCE:
=> the list align won't be center & an empty center bbcode will have appeared on the top
Back to Bb Code editor:
Code:
[CENTER] [/CENTER]
[LIST]
[*]dzzad
[*]dzad
[*]dzdzad
[*]zdzad
[/LIST]

2) Example 2
In TinyMCE:
Create a list and apply an align center on whole of it
To Bb Code Editor:
Code:
[LIST]
[*][CENTER]dzzad[/CENTER]
[*][CENTER]dzad[/CENTER]
[*][CENTER]dzdzad[/CENTER]
[*][CENTER]zdzad[/CENTER]
[/LIST]
 
I will release a new version soon. I still need to add an option and it's ready. I don't think I will be able to continue to support this... it takes really too much time.
 
cclaerhout updated TinyMCE Fix with a new update entry:

Version 0.4 released

Version 0.4 released
  • Regex for guilty tags changed (support tag with options now)
  • Pre-parser created (a nightmare to code, but it should fix a lot problems)
To update:
  1. upload files (only libraries if you don't want to waste time)
  2. import xml file
  3. update the guilty tags list with those:
    Code:
     left,center,right,b,i,u,s,font,color,size
As I said in one post, those fixes take too much time to support. If you see an error and it's...

Read the rest of this update entry...
 
cclaerhout updated TinyMCE Fix with a new update entry:

Version 0.42 released

Version 0.42 released
> Main regex of the pre parser has been fixed
> The pre-parser option is now uncheck by default. I let you check it and test it on one of your message with a complex layout (inside the editor TinyMCE=>BbCode=>TinyMCE) to verify it doesn't mess up anything

To update: upload files and import XML file

Don't forget to update the guilty tags list:
left,center,right,b,i,u,s,font,color,size

Read the rest of this update entry...
 
I quickly tested this, but it broke the photo/link/embed functionality. The iframe would open, I could enter an address, hit insert, then it would completely reload the popup iframe instead of inserting the code.

This could very well be due to our mods to Xenforo. Our CSS is a single file for the entire site, completely separated from the old Xen method of loading styles. Our whole site is quickly becoming more of a xenforo fork.

Project looks promising. Nice work :)
 
I quickly tested this, but it broke the photo/link/embed functionality. The iframe would open, I could enter an address, hit insert, then it would completely reload the popup iframe instead of inserting the code.

This could very well be due to our mods to Xenforo. Our CSS is a single file for the entire site, completely separated from the old Xen method of loading styles. Our whole site is quickly becoming more of a xenforo fork.

Project looks promising. Nice work :)
I don't see why a Css would break a Javascript, but all TinyMCE insertions via the TinyMCE plugin "inline-popup" have been tested and they are working everywhere but Mobile Chrome (when they were using Ajax to manage datas).
That bug has been reported to TinyMCE, but considering that it's working with Mobile Safari and other mobile browsers, it should be a Mobile Chrome Javascript bug.
 
Just noticed my "Project looks promising" comment reads as being a bit condescending, that certainly wasn't my intention. I was impressed with your work.

I'm not sure why it was failing. All caches cleared, etc. Same behaviour in the iPad Simulator and Chrome Mac (Dev + Canary). It must be something on our end.
 
Top Bottom