How to add the button to WYSIWYG bar?

4.35K viewsGeneral
0

I often find myself writing in this WYSIWYG area, then I put some code like this:

>>> df.rename(columns={'A': 'Column1', 'B': 'Column2'}, inplace=True)
>>> df
            Column1  Column2
2015-01-01        1        6
2015-01-02        2        7
2015-01-03        3        8
2015-01-04        4        9
2015-01-05        5       10

On this WYSIWYG, it automatically inserted a newline return after pasting in crayon but on my site, it does not do this so what ends up happening is my cursor is stuck within the code and I can’t get out of it to create a new line.

A good use-case is when I go to edit an answer and the last thing in the answer is a crayon code block.  I can’t press enter to write text below it.

I was thinking one solution would be for me to add a code button to the WYSIWYG editor so I could switch to HTML mode for a second to enter a new line.  Can this be easily done in WordPress functions.php?  Or is there a better way?

0

I had the same issue with crayon. Kindly report this to the author and and they will make a fix for this.