Python Forum
Can WYSIWYG Die? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Board (https://python-forum.io/forum-26.html)
+--- Thread: Can WYSIWYG Die? (/thread-1618.html)

Pages: 1 2 3


RE: Can WYSIWYG Die? - metulburr - Jan-17-2017

OK. Either way i am not sure why it is doing that. I dont believe its in class_parser anymore as it does it immediately when you paste it into the editor. MyBB's Javascript then?


RE: Can WYSIWYG Die? - metulburr - Jan-18-2017

testing with UserCP source mode enabled:


TABS:
class Klass:
def __init__(self):
pass

def test(self):
while blah:
if blah_blah:
if blah_blah_blah:
pass

class Klass:
def __init__(self):
pass 

def test(self):
while blah:
if blah_blah:
if blah_blah_blah:
pass 
SPACES:
class Klass:
   def __init__(self):
       pass
   
   def test(self):
       while blah:
           if blah_blah:
               if blah_blah_blah:
                   pass

class Klass:
   def __init__(self):
       pass 
   
   def test(self):
       while blah:
           if blah_blah:
               if blah_blah_blah:
                   pass 



RE: Can WYSIWYG Die? - micseydel - Jan-18-2017

Things were working and stopped working at some point, right? Tabs haven't been broken on MyBB forever.


RE: Can WYSIWYG Die? - metulburr - Jan-18-2017

im not sure. I never tested tabs before this.


RE: Can WYSIWYG Die? - micseydel - Jan-18-2017

Neither have I, it just seems like there's been a huge uptick.


RE: Can WYSIWYG Die? - metulburr - Jan-18-2017

its probably some class(s) or some editor that is using tabs by default


RE: Can WYSIWYG Die? - stranac - Jan-23-2017

The not-replacing-tabs-with-spaces thing is my plugin's fault. I'm not sure why normal tabs aren't showing though...
I should have some time tomorrow, so I'll look into it.

EDIT:
It seems that the removing tabs thing is completely the WYSIWYG editor's fault, as they are removed on the client side.
Tabs that actually reach the server side are displayed correctly.

I would try figuring out what is going on, but SCEditor makes my head hurt.
The last time I tried writing a plugin for it (on a local MyBB install), to add support for our custom tags, it would get completely borked whenever I added... pretty much anything.


RE: Can WYSIWYG Die? - Skaperen - Jan-24-2017

if people want to use tabs in a WYSIWYG editor, then they need to specify what their tabs mean.  without the user specifying that then what the board operator specifies can be used.  without that the client side editor would do a little pop-up that tells the user that tabs have not been specified.

i dislike WYSIWYG for other reasons.  it makes life more difficult in many ways when in-line attributes like the [] tags are used.

properly designed, WYSIWYG can be nice.  with limited client side programming there is less such opportunity.  tabs + WYSIWYG could be just a spacing tool and might have a smarter meaning for python code, then the resulting code can just use spaces.  uploaded code would be a different issue (should we accept source files with tabs?).


RE: Can WYSIWYG Die? - micseydel - May-24-2017

Another first-poster who was ruined https://python-forum.io/Thread-PyCharm-cannot-post-unformatted-code
Tabs aside (since this thread degenerated before), WYSIWYG and code don't work well on a programming forum. All the other code-oriented forums / Q+A sites I've seen require BBcode or markup or something.


RE: Can WYSIWYG Die? - metulburr - May-24-2017

Ok so MyBB 1.8.X series is using WYSIWYG editor. I heard MyBB 2.0 will have the option to switch on/off WYSIWYG editor. But that is a long ways away. As is...You can only change the MyBB 1.8.x editor by reinstating it with another editor. Both of the following are plugin editors but have seen some bugs from users complaining about it. But they do not have WYSIWYG.

CKEditor
https://community.mybb.com/mods.php?action=view&pid=849

Yui Editor
https://community.mybb.com/mods.php?action=view&pid=554

im not sure what happens to our custom BBCodes if we change the editor via plugin. Not sure if they stay, or if we have to remake them, or if its not possible with the plugin. Wouldnt know until i try to implement it.

The other option is to keep it as it is, but switch everyones editor view to source mode by default. Everyone can do this already in their UserCP on a per user basis currently. But i mean to default new users to it and change the current. I believe this would just insert the BBCode of the copied formatted text making it obvious that it is formatted text to new users (not sure i would have to test this). But instead of HTML in python code tags, we would have BBCode then.

The other option is to somehow disable WYSIWYG editor in the core. Though this is ideal, I am not sure how to do this at all. It could result in a long drawn out testing ground again like the beginning.