TinyMCE Fix (NO MORE SUPPORTED)

TinyMCE Fix (NO MORE SUPPORTED) 0.7.1

No permission to download

cclaerhout

Well-known member
cclaerhout submitted a new resource:

TinyMCE Fix (version 0.1) - A few fixes for TinyMCE and XenForo Parser

TinyMCE Fix
By Cédric

Disclaimer:
If after applied this fix, TinyMCE and XenForo parser continue to have problems and still make you want to kill them, please don't blame me for this :coffee: Just wait XenForo developers to really fix those bugs.

List of bugs targeted by this fix:...

Read more about this resource...
 
Cédric, there is one thing that really annoys me with the editor. When center tag is applied to a long text, with images and stuff, it adds CENTER BB Code to every single line! I used to do that with vB 3.7 and it would only add one CENTER tag! It's a problem because when you edit in the rich editor, try to delete a line or two for instance, the post gets messed up! Would it be possible to change that behaviour, as a fix maybe?
 
Cédric, there is one thing that really annoys me with the editor. When center tag is applied to a long text, with images and stuff, it adds CENTER BB Code to every single line! I used to do that with vB 3.7 and it would only add one CENTER tag! It's a problem because when you edit in the rich editor, try to delete a line or two for instance, the post gets messed up! Would it be possible to change that behaviour, as a fix maybe?

I know (see here and here too)... and that's really difficult to fix this with the only tool we have: regex.
 
Cédric, there is one thing that really annoys me with the editor. When center tag is applied to a long text, with images and stuff, it adds CENTER BB Code to every single line! I used to do that with vB 3.7 and it would only add one CENTER tag! It's a problem because when you edit in the rich editor, try to delete a line or two for instance, the post gets messed up! Would it be possible to change that behaviour, as a fix maybe?
It seems I found a solution, but would you have a big article/code to give so that I can test this. I'm going to use one of mine too.
 
It seems I found a solution, but would you have a big article/code to give so that I can test this. I'm going to use one of mine too.
emm you mean you need a hand testing? if thats the case sure, happy to see this happening. :)(y)
 
emm you mean you need a hand testing? if thats the case sure, happy to see this happening. :)(y)
I mean if you've got a code or an article which make you a lot of problems with those tags pollution, could you send it to me?

This "tag pollution" has been fixed (well at least I hope), but there is still a problem with empty tag which shouldn't be hard to fix
 
Thanks for this I will try it tonight. There is a bug that bothers me a lot and is when I Bold any sentence often I can't add new lines.
 
Pollution effect - Manual fix


NOT NEEDED ANYMORE
edit 2012/11/08

Class: XenForo_Html_Renderer_BbCode
Function: public static function renderFromHtml($html, array $options = array())
Just before
PHP:
return $rendered;
Add:
PHP:
        //Clean empty bbcodes
$RegexPattern_killer = '#\[([^\]]+)(?:=[[^\]]+)?](?:\s+)?\[/\1\]#iu';
$rendered = preg_replace($RegexPattern_killer, '', $rendered);
 
i have this bug too (Chrome)
Which are the steps to reproduce the problems. I've just test it, and nothing wrong for me, but If it's pure TinyMce Javascript (which would mean this would be a real bug this time ^^), I won't be able to fix it.
 
Which are the steps to reproduce the problems. I've just test it, and nothing wrong for me, but If it's pure TinyMce Javascript (which would mean this would be a real bug this time ^^), I won't be able to fix it.
hard to say. sometimes it makes me crazy, but its not all the time.
 
On editing an existing post, pressing return at the end of the line with bold text doesn't create a new line (in the editor), is this something you can fix? Its the biggest bug with TinyMCS that really bothers me

(this was mentioned above by kkm323, and I can reproduce it.. so far in Chrome, and something strange in FF)

In Chrome:

trying to reproduce, new lines: I didn't see these new lines and it seems like they didnt happen <


In FireFox


It just looks weird (on pressing return at the end of a line with bold, it seems to bring you to the beginning of the same line... but actually does create the new line)

ehFF.webp

Steps To Reproduce:
1) Create a post
2) Edit the post and make the last word bold
3) Go to the the end of that line and press return

Expected:
A new line is created and you are taken to the next line

Acutal:
In chome, nothing at all happens, in FF you are taken back to the beginning of the same line

Versions tested against:
FF 7.0.1
Chrome 22.0.1229.94
 
I mean if you've got a code or an article which make you a lot of problems with those tags pollution, could you send it to me?

This "tag pollution" has been fixed (well at least I hope), but there is still a problem with empty tag which shouldn't be hard to fix

Here is a sample text that I have centered. I saved the bb code and as you will see there are CENTER Tags everywhere :S
 

Attachments

I think you're fixing some of the most annoying things I've found with XF (apart from these little bugs, XF shines)

Well done ;)

I'll definitely download and rate it once this one is fixed
 
Top Bottom