MyBB Community Forums

Full Version: preview degrades indentation in editor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The users from our forum has came across a fluke regarding the quick reply editor removing 1 indent from any lines that are indented. This might sound trivial, but in a language such as Python that uses indentation to signify blocks of code it is important.

This occurs only in the quick reply editor not advanced editor.   Found out it actually occurs in both. 

to replicate....
type code indented (or any lines actually) and hit preview to take the code to your advanced editor. There you will see the code has removed 1 space indent from any line indented.

before: (what i put into the editor)

What comes out from that input into the post...

As you can see the second line containing the content of "1 indent" is meant to be indented 1 space, and it is when i put it in (as specified by the orange highlighted whitespace). However on the output, there is no space there. And every line after is 1 less space than what was inputted.

After playing around i found it to be "preview" in advanced editor or quick reply causes the issue. Preview will actually change the whitespace in the editor field of 1 less space afterwords.
Still having this problem.
Don't have a solution for you, but can confirm that's what happens. Perhaps try ckeditor as an alternative editor ?
It seems to happen when you hit "preview" on both the advanced or quick reply. Wouldn't that have nothing to do with the editor?

Another question....if you switch editors; what happens to custom buttons you laid out from "myinsertbutton" plugin to add custom buttons.
So i tried ckeditor and it kinda fixed it but kind of create a new problem. It would remove the entire whitespace before a line in WYSIWYG mode, and you would have to force it to source mode before putting code in. 

However the Rin Editor based on ckeditor doesnt do this. IT works regardless of WYSIWYG or source mode. 

I would hope MyBB fixes this issue before MyBB 2.0 so a plugin is not needed to fix a default editor? Can a moderator move this thread to a MyBB 1.8 bug and issues forum? As it appears that is what it is. 
Ckeditor and all its editors that use it as a base code, has other issues, like it remove empty brackets. So if you put in the code

arrray = []

Ckeditor will output
array =

anyone came up with a solution?
I would just like to make sure that this issue is not moved over to MyBB 2.0

Can a moderator move this to MyBB 2.0 suggestions?