denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
Denise ([staff profile] denise) wrote in [site community profile] dw_dev2016-10-02 02:04 am
Entry tags:

Help poke at the new RTE for the beta update page!

[ profile] wohali has been working on issue 664 to add a RTE to the new beta update page, and is ready for more eyeballs to poke at it and try to hit weird/unusual use cases or things that could be improved!

If you have a few, please poke at the new RTE on [ profile] wohali's dreamhack. To test it:

* Go to and create an account.
* Go to to turn on the beta update page and to make a post with it.

The update page should default to RTE on the beta update page. To disable it, go to Settings and check "Completely disable the Rich Text Editor (use plain textarea only)". (Historically speaking, a lot of RTE glitches happened when switching from HTML mode to RTE mode, so it's probably worth testing that a bunch.) Accessibility help is available by pressing Alt+0 (zero) while the editor is focused.

If you run into a problem or want to give feedback, you can comment on this entry. If reporting a problem, please include a link to the entry you made so [ profile] wohali can see the markup!

[personal profile] swaldman 2016-10-02 06:53 am (UTC)(link)

However, think we have a problem with the interaction between the RTE and the "add br tags for linebreaks" functionality, and I don't think it's one that can be solved in a way that pleases absolutely everybody.

The more-elegant way that the RTE now deals with HTML that was entered in raw view means that it is now corrected and prettified, so that a round-trip HTML->RTE->HTML finishes with something different than when it started (paragraph tags are added, new lines and intents are added, and so forth).

But the system that converts newlines into < br > tags has no way to tell between meaningful newlines that were added by the user, and syntactically non-meaningful newlines that were added by the RTE the previous time around. The RTE will add < br > tags for newlines that it itself created, meaning that multiple round-trips can have really unexpected results. See this video for a demonstration:

This is A Problem IMHO, and I can't see any way of making it work intuitively for everybody with the currently desired behaviour, at least without very complex kludges. (this doesn't mean there isn't a way, just that I can't think of one)

A suggestion: Would it be acceptable to only add a < br > tag for a *double* newline, not a single one? This would require a change from those who use the auto-newlines feature (I confess I am not one of them), but it is a new behaviour that would be familiar to some from other markup languages (e.g. LaTeX, Markdown).

Line one

Line Two

would be changed to

Line one< br >
Line Two

or perhaps

Line one
< br >
Line Two

which would still be readable HTML but would remove the "already processed" double newline and avoid having it acted upon again, and I reckon (hopefully?) make multiple roundtrips between RTE and HTML modes a safe thing to do.
Edited 2016-10-02 06:58 (UTC)
wohali: photograph of Joan (Default)

[personal profile] wohali 2016-10-02 03:29 pm (UTC)(link)
Hi everyone!

[staff profile] denise thank you so much for posting this, I really appreciate the call to action.

Redesigning the Rich Text Editor (RTE) took a lot of hemming and hawing over some delicate, confusing design decisions, ones that are heavily constrained by history and expected behaviour.

If you're interested in a deeper dive into the work completed, I've written about these choices at length in my journal. I welcome follow-ups here or there.