1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained TinyMCE Fix (NO MORE SUPPORTED) 0.7.1

Last TinyMCE modified for XenForo, fast popups and some fixes for TinyMCE & Xenforo parser

  1. cclaerhout

    cclaerhout Well-Known Member

    cclaerhout submitted a new resource:

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

    Read more about this resource...
    Jarod, 8thos and yavuz like this.
  2. yavuz

    yavuz Well-Known Member

    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?
  3. cclaerhout

    cclaerhout Well-Known Member

    I know (see here and here too)... and that's really difficult to fix this with the only tool we have: regex.
    yavuz likes this.
  4. cclaerhout

    cclaerhout Well-Known Member

    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.
    yavuz likes this.
  5. HWS

    HWS Well-Known Member

    Cédric, thank you very much for fixing that! Really appreciate it.
  6. yavuz

    yavuz Well-Known Member

    emm you mean you need a hand testing? if thats the case sure, happy to see this happening. :)(y)
  7. cclaerhout

    cclaerhout Well-Known Member

    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
  8. kkm323

    kkm323 Well-Known Member

    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.
    Steve F likes this.
  9. cclaerhout

    cclaerhout Well-Known Member

    Really? I never had this bug.
  10. principia

    principia Well-Known Member

    i have this bug too (Chrome)
    Steve F likes this.
  11. cclaerhout

    cclaerhout Well-Known Member

    Pollution effect - Manual fix

    edit 2012/11/08

    Class: XenForo_Html_Renderer_BbCode
    Function: public static function renderFromHtml($html, array $options = array())
    Just before
    return $rendered;
            //Clean empty bbcodes
    $RegexPattern_killer '#\[([^\]]+)(?:=[[^\]]+)?](?:\s+)?\[/\1\]#iu';
    $rendered preg_replace($RegexPattern_killer''$rendered);
  12. cclaerhout

    cclaerhout Well-Known Member

    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.
  13. principia

    principia Well-Known Member

    hard to say. sometimes it makes me crazy, but its not all the time.
  14. tenants

    tenants Well-Known Member

    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)


    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

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

    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
    D.O.A., Steve F, principia and 2 others like this.
  15. cclaerhout

    cclaerhout Well-Known Member

  16. yavuz

    yavuz Well-Known Member

    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

    Attached Files:

  17. cclaerhout

    cclaerhout Well-Known Member

    Then the 0.2 version should do the job ;)
    yavuz likes this.
  18. cclaerhout

    cclaerhout Well-Known Member

    It seems it's because there are some empty html tags with a the tag span for the bold style. I think the fix should be to replace them with real empty <p> tags.
    tenants likes this.
  19. tenants

    tenants Well-Known Member

    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
  20. yavuz

    yavuz Well-Known Member

    You are the best! Will install the addon soon.

Share This Page