WordPress.org

Make WordPress Core

Opened 22 months ago

Closed 21 months ago

Last modified 18 months ago

#20993 closed enhancement (fixed)

Rename the "HTML" editor tab to "Text"

Reported by: azaozz Owned by: markjaquith
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

This would reflect the "HTML" editor's purpose a lot better. Calling it "HTML Editor" is wrong as it doesn't really allow editing all of the html code. It allows editing the post content in "text" mode where html tags can be used.

Generally the Visual editor can be compared to MS Word or OO Writer, and the "HTML" editor to Notepad or TextEdit. In the Visual editor the final html code is generated in the background by TinyMCE and the browser. In the "HTML" editor the final html code is generated by wpautop().

The "HTML" editor has the following features:

  • Converts blocks of text separated by two consecutive line breaks to html paragraphs. This allows the user to type in exactly the same way as in any plain text editor and have their content shown properly after publishing.
  • Trims spacing and line breaks around html tags so the blocks of text flow naturally.
  • Has a toolbar with buttons for quick entry of common html tags (Quicktags).

These features make it a nice "Text" editor and a good alternative to the Visual editor especially for quick posts that don't need much formatting. However calling it "HTML" editor misleads the users that are familiar with html coding. These users expect to have access to all of the underlying html code which is not the case in the "HTML" editor.

In short: changing the name to "Text" would reflect how that editor works much better and won't mislead users that try to code html by hand.

Attachments (5)

20993.diff (918 bytes) - added by jrgp 22 months ago.
Turns "HTML" to "Text" as required by ticket.
20993_help.diff (3.5 KB) - added by MattyRob 22 months ago.
20993-2.patch (1.5 KB) - added by azaozz 22 months ago.
20993.3.diff (943 bytes) - added by kobenland 21 months ago.
Shot at providing context for tab description of Text mode
20993.4.diff (944 bytes) - added by obenland 21 months ago.

Download all attachments as: .zip

Change History (26)

comment:1 knutsp22 months ago

  • Cc knut@… added

+1

comment:2 jane22 months ago

  • Keywords ux-feedback removed

We have discussed this before and said we'd put it up for feedback in 3.5. I'm very much in favor of this label change, because then we can (theoretically) say goodbye to the "Why does WordPress eat my HTML" question that is forever being asked by people who like to add lots of extra line breaks and such. +1 from the ux corner.

comment:3 sabreuse22 months ago

  • Cc sabreuse@… added

comment:4 nacin22 months ago

Out of curiosity, how easy would it be for our API to be extended to allow a "third" editor implemented by a plugin called "HTML"? How much does our existing editor and DFW code rely on "html" as the name of the editor?

comment:5 azaozz22 months ago

At the moment it's pretty easy to add another editor tab. Could be a bit tricky to have it set as the default when the editor loads, but can be handled by some jQuery.

The problem is with filtering the content between TinyMCE, the current textarea content and the new tab (assuming the new tab will use the same textarea).

On the other hand there's a function in TinyMCE to display the underlying html code in a (large) popup. That gives access to the "full" html code without messing with the JS autop and filtering. It's very easy to enable, a plugin would only need to add 'code' to the buttons. Was even thinking to add that by default to the second toolbar row in TinyMCE.

Can be tested by running this from the browser's console:

tinymce.activeEditor.execCommand('mceCodeEditor');
Last edited 22 months ago by azaozz (previous) (diff)

comment:6 tw211322 months ago

  • Cc michael.d.beckwith@… added

comment:7 markjaquith22 months ago

Sure. "Text" is a more accessible word anyway.

jrgp22 months ago

Turns "HTML" to "Text" as required by ticket.

comment:8 markjaquith22 months ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In [21211]:

Rename the "HTML" editor tab to "Text" (as it has never been a pure HTML editor, but a text editor that supports HTML and also does some HTML transformations automatically). fixes #20993

comment:9 markjaquith22 months ago

In [21212]:

Switch "HTML" tab to "Text" in DFW mode. Update documentation and inline comments to refer to the "Text" tab or mode instead of "HTML". see #20993

comment:10 scribu22 months ago

  • Cc scribu added

comment:11 follow-up: MattyRob22 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Don't forget to update the references to that tab in the contextual help

MattyRob22 months ago

comment:12 in reply to: ↑ 11 SergeyBiryukov22 months ago

Replying to MattyRob:

Don't forget to update the references to that tab in the contextual help

Seems to be covered in [21212].

comment:13 MattyRob22 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Agreed, seems pretty well covered there, I was looking at the patch and change set on this ticket alone.

azaozz22 months ago

comment:14 azaozz22 months ago

Was thinking we may need to mention in the phpdoc for WP_Editors, wp_default_editor(), etc. that 'html' refers to the Text tab.

comment:15 azaozz22 months ago

In [21218]:

Clarify that 'html' refers to the Text editor tab, see #20993

comment:16 follow-up: kau-boy21 months ago

  • Cc kau-boy added

I would suggest to use the _x() Funktion for that string as 'text' is not a special term and some translators might not be aware of translation text properly to also fit it in the context of the editor.

comment:17 in reply to: ↑ 16 ; follow-up: nacin21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to kau-boy:

I would suggest to use the _x() Funktion for that string as 'text' is not a special term and some translators might not be aware of translation text properly to also fit it in the context of the editor.

I agree.

kobenland21 months ago

Shot at providing context for tab description of Text mode

comment:18 azaozz21 months ago

How about:

_ex( 'Text', 'Name for the Text editor tab (formerly HTML)' );

obenland21 months ago

comment:19 obenland21 months ago

  • Keywords has-patch added

20993.4.diff picks up azaozz' context suggestion

comment:20 azaozz21 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [21417]:

Add translation context for the Text editor tab name, props obenland, fixes #20993

comment:21 in reply to: ↑ 17 nemgavekort18 months ago

Nothing.

Last edited 18 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.