MyBB Community Forums

Full Version: fixing preview bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you write out a post, then preview, then post it, you lose indentation....or a single space. The following lines are correctly formated as they say when i typed out this post. However after i preview it, the indentation is lost by 1 space, messing up the entire indentation. 


LINE 1 with no spaces
 LINE 2 with 1 spaces
  LINE 3 with 2 spaces
    LINE 4 with 3 spaces
     LINE 5 with 4 spaces
Also if you (mods) look at my formatting, it remains correct, but shows incorrectly. Note how line 2 no longer has a single space before it, yet does in my text. And as i sit here and edit my post even further, it never fixes it, but remains an issue.

Switching to a different plugin editor fixes this issue...but then those editors have even more problems that does not exist with mybb default editor. My forum is unique as it is Python programming language which requires indentation to be perfect as it is how the language determines blocks of code...and people post wondering why their code is changed when they preview it. So it might not be a big deal to some, but it is to us.

I think this bug should be fixed with the default editor. And it has nothing to do with what plugins i have installed as it is occurring here on mybb.com too.
1.8 currently uses an older version of SCEditor, though we're planning on upgrading it in a future 1.8 release (possibly 1.8.16). I don't know if it'll fix this issue, but it might.
Is the preview part of SCEditor or strictly MyBB? Their demo doesnt include a preview so i cant test whether it happens with their latest version.
https://www.sceditor.com/
(2018-02-01, 11:21 AM)metulburr Wrote: [ -> ]Is the preview part of SCEditor or strictly MyBB? Their demo doesnt include a preview so i cant test whether it happens with their latest version.
https://www.sceditor.com/

The preview functionality is MyBB. We need to determine whther it's MyBB that removes the spaces (I don't believe so), or if SCEditor do some weird processing to the text we pass into it when you come into the preview page (which is entirely possible).
well it doesnt happen when i install the Rin Editor. So I would assume that it was MyBB preview and not the editor.