Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
indentation loss
#1
1) pasted in source mode (Which should be default when you open an editor)
def list_count_4(nums):
  count = 0  
  for num in nums:
    if num == 4:
      count = count + 1
 
  return count
2) is correctly formated
3) then toggled to WYSIWYG mode
def list_count_4(nums):
count = 0
for num in nums:
if num == 4:
count = count + 1

return count
5) now loses indentation, and you cant get it back by toggling

However if you first toggle to WYWIWYG mode (if thats what you want) then paste code, it doesnt affect it. Only when you toggle between them.
def list_count_4(nums):
  count = 0  
  for num in nums:
    if num == 4:
      count = count + 1
 
  return count
So yeah i guess if you toggle the modes when code is already on the post, it just removes the indentation altogether. Ill add that in the help docs
Recommended Tutorials:
Reply
#2
Can we just turn off WYSIWYG? This doesn't seem anywhere near worth it.
Reply
#3
It drives me crazy!
Reply
#4
we did with the default MyBB Editor. But then we found out the problem of the default editor was removing one space before code if you previewed it. So then we switch to Rin Editor. Which has a shit load even more problems. mainly the bad on being empty brackets and the indentation loss when toggling to WYSIWYG mode.

MyBB wont allow to toggle the option to turn off WYSIWYG mode until 1.10 or maybe even 2.0

The Rin Editor is a massive javascript fuck nest. I would love to just remove WYSIWYG mode at this point. It is not even worth it, and just causing a problem.

EDIT:
If we could remove the toggle button from view, that should work for now. Since we start in source mode by default that would just disallow toggling to WYSIWYG mode, but then there are other buttons that are only for WYSWIYG mode, that could also be removed. But i believe this is harder than it is due to javascript

EDIT2:
I tried editing the rin editor source from this
    if($mybb->user['sourceeditor'] == 0)
    {
        $sourcemode = "source";
    }
    else {
        $sourcemode = "wysiwyg";
    }
to this
    if($mybb->user['sourceeditor'] == 0)
    {
        $sourcemode = "source";
    }
    else {
        $sourcemode = "source";
    }
but nothing took effect when toggling. It stills goes to wysiwyg mode.
Recommended Tutorials:
Reply
#5
I often use the WYSIWYG mode and then post directly from there. The font is so tiny that my antique eyes (eye actually, only one works) has a hard time reading it,
but I still prefer it to getting python tags reformatted with lots of code tags inserted, and non terminated URL tags.
Reply
#6
WOW posting that javascript doc here fucked the thread up

anyways. its here
https://community.mybb.com/mods.php?acti...oad&pid=73
/jscripts/ckeditor/ckeditor.js

If you guys want to look around to see what to edit to get rid of WYSIWYG mode.
Recommended Tutorials:
Reply
#7
I have to post with this account,
as editor don't work at all on my account.
So can you revert back the changes.
Reply
#8
i didnt make any permanent changes. The only change i made was reverted right after i found out it didnt work. /inc/plugins/rinedit.php line 717

I did however post javascript here, which for awhile was lagging this thread bad. But that was like 12+ hours ago that i removed it from the post.
Recommended Tutorials:
Reply
#9
I tried my account again,but editor stay inactive(grayed out),
no matter what i do.
No difference on phone,so it's related to my account Confused
Reply
#10
Quote:i didnt make any permanent changes. The only change i made was reverted right after i found out it didnt work. /inc/plugins/rinedit.php line 717
Are you sure you got all revert back?
My account has not worked after this as editor is inactive(grayed out),
witch kind of annoying and i have no idea how to fix it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  server reset loss data ~2 hours metulburr 8 5,399 Dec-11-2017, 05:54 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020