Make WordPress Core

Opened 15 months ago

Last modified 10 months ago

#23299 new enhancement

Definition List in Editor

Reported by: gputignano Owned by:
Milestone: Future Release Priority: low
Severity: minor Version: 2.2
Component: Editor Keywords: has-patch needs-testing
Focuses: Cc:


After switch from Text to Visual and then from Visual to Text the formatting of the definition list is lost.

Attachments (2)

23299.patch (1.3 KB) - added by ocean90 15 months ago.
23299.2.patch (1.3 KB) - added by ocean90 15 months ago.

Download all attachments as: .zip

Change History (6)

ocean9015 months ago

comment:1 follow-up: ocean9015 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6
  • Severity changed from major to normal
  • Version changed from 3.5 to 2.2


<dd>Bar Foo Bar</dd>

Expected output:

	<dd>Bar Foo Bar</dd>

Actual output:

<dl><dt>Foo</dt><dd>Bar Foo Bar</dd></dl>


The expected output comes from the output of an (un)ordered list. So we should be able to do the same for definition lists.

23299.patch adds just the new line for each element. Seems like the tab indention is handled in TinyMCE; azaozz, help?

comment:2 in reply to: ↑ 1 ; follow-up: ocean9015 months ago

Replying to ocean90:

Seems like the tab indention is handled in TinyMCE; azaozz, help?

Strike that. Done in 23299.2.patch.

ocean9015 months ago

comment:3 in reply to: ↑ 2 azaozz15 months ago

  • Keywords needs-testing added
  • Priority changed from normal to low
  • Severity changed from normal to minor

Strike that. Done in 23299.2.patch.

Yep, HTML white space in the Text editor is controlled by pre_wpautop(). However the changes there are permanent, post_content is saved exactly as shown (whether the user switches to the Text editor or not) so any changes there will affect the PHP wpautop() and how the content is displayed on the front-end.

In this particular case nothing seems to break. Note that <dl> is not handled in TinyMCE by default, pasting <dl> in the Text editor and trying to edit it from the Visual editor won't work well. There is a TinyMCE plugin that handles it but it's not included by default.

comment:4 ocean9010 months ago

  • Milestone changed from 3.6 to Future Release
  • Type changed from defect (bug) to enhancement
Note: See TracTickets for help on using tickets.