[wp-trac] [WordPress Trac] #12423: Include Ace (or similar) as default code editor

WordPress Trac noreply at wordpress.org
Sat Jan 14 17:47:31 UTC 2017


#12423: Include Ace (or similar) as default code editor
-----------------------------+-----------------------
 Reporter:  scribu           |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  4.8
Component:  Editor           |     Version:  3.0
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+-----------------------

Comment (by iseulde):

 Thanks @westonruter for reopening this. Cc @joen @azaozz.

 Some other conversations: https://wordpress.slack.com/archives/core-
 editor/p1484239765000646 (scroll a bit down too).

 We have talked about this lot for the text editor too and I'm leaning
 towards a yes to add a code editor there as well. In the case of the text
 editor, I would still keep the look more or less similar to what we have
 at the moment: a light (maybe even just greyed text) theme, no line
 numbers etc. In other words, no scary code editor feeling.

 The benefits would be:

 * '''Syntax Validation'''. This is very useful for users who just want to
 change something small and are not that familiar with HTML.
 * '''Autocomplete tags'''. This might be especially useful if we want to
 drop auto-p.
 * '''Separate HTML tags and text with colour'''. Initially I though just
 greying out the HTML tags a bit would be a good default. We could format
 the HTML better too to make it more readable.
 * '''Switching mode without losing context'''. This has been a hard issue
 to solve with a text area, but if we use a code editor it's easy to scroll
 to the right part in either mode when switching.

 I wouldn't add a code editor without making it a pure HTML editor. I'm not
 entirely sure what all the reasons were for adding auto-p all these years
 a go, but my guess is that:

 * It was annoying to add all the paragraphs by hand.
 * There was no visual editor, and it make it a bit more visually pleasant.
 * It would be noisy to have all the paragraph tags.
 * It would looks more like code and scary.

 With just a text area these issues were hard to solve. But a code editor
 comes with many possibilities:

 * Autocompleting paragraph tags when pressing enter, which would be
 similar to the visual editor.
 * We can grey out the paragraph tags, or, more extremely even, make them
 invisible.
 * We can leave a margin between the top level tags so it resembles the
 visual side more closely.

 So a code editor could also mean no more auto-p!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/12423#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list