Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20993 closed enhancement (fixed)

Rename the "HTML" editor tab to "Text"

Reported by: azaozz's profile azaozz Owned by: markjaquith's profile 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 12 years ago.
Turns "HTML" to "Text" as required by ticket.
20993_help.diff (3.5 KB) - added by MattyRob 12 years ago.
20993-2.patch (1.5 KB) - added by azaozz 12 years ago.
20993.3.diff (943 bytes) - added by kobenland 12 years ago.
Shot at providing context for tab description of Text mode
20993.4.diff (944 bytes) - added by obenland 12 years ago.

Download all attachments as: .zip

Change History (26)

#1 @knutsp
12 years ago

  • Cc knut@… added

+1

#2 @jane
12 years 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.

#3 @sabreuse
12 years ago

  • Cc sabreuse@… added

#4 @nacin
12 years 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?

#5 @azaozz
12 years 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 12 years ago by azaozz (previous) (diff)

#6 @tw2113
12 years ago

  • Cc michael.d.beckwith@… added

#7 @markjaquith
12 years ago

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

@jrgp
12 years ago

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

#8 @markjaquith
12 years 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

#9 @markjaquith
12 years 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

#10 @scribu
12 years ago

  • Cc scribu added

#11 follow-up: @MattyRob
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

@MattyRob
12 years ago

#12 in reply to: ↑ 11 @SergeyBiryukov
12 years ago

Replying to MattyRob:

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

Seems to be covered in [21212].

#13 @MattyRob
12 years 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.

@azaozz
12 years ago

#14 @azaozz
12 years 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.

#15 @azaozz
12 years ago

In [21218]:

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

#16 follow-up: @kau-boy
12 years 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.

#17 in reply to: ↑ 16 ; follow-up: @nacin
12 years 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.

@kobenland
12 years ago

Shot at providing context for tab description of Text mode

#18 @azaozz
12 years ago

How about:

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

@obenland
12 years ago

#19 @obenland
12 years ago

  • Keywords has-patch added

20993.4.diff picks up azaozz' context suggestion

#20 @azaozz
12 years 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

#21 in reply to: ↑ 17 @nemgavekort
12 years ago

Nothing.

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