Opened 12 years ago
Closed 9 years ago
#23299 closed defect (bug) (fixed)
Definition List in Editor
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | low |
Severity: | minor | Version: | 2.2 |
Component: | Editor | Keywords: | has-patch good-first-bug commit |
Focuses: | Cc: |
Description
After switch from Text to Visual and then from Visual to Text the formatting of the definition list is lost.
Attachments (3)
Change History (16)
#1
follow-up:
↓ 2
@
12 years 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
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
12 years ago
Replying to ocean90:
Seems like the tab indention is handled in TinyMCE; azaozz, help?
Strike that. Done in 23299.2.patch.
#3
in reply to:
↑ 2
@
12 years 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.
#4
@
12 years ago
- Milestone changed from 3.6 to Future Release
- Type changed from defect (bug) to enhancement
#8
@
9 years ago
- Keywords good-first-bug added
Patch doesn't apply cleanly anymore as the wp-admin/js/editor.js
has changed a bit over the year.
This ticket was mentioned in Slack in #core by voldemortensen. View the logs.
9 years ago
#12
@
9 years ago
- Keywords commit added
- Milestone changed from Future Release to 4.5
Just tested 23299.diff.
Input:
<dl> <dt>Foo</dt> <dd>Bar Foo Bar</dd> </dl>
Actual output:
<dl> <dt>Foo</dt> <dd>Bar Foo Bar</dd> </dl>
Conclusion: It works like a charm.
Input:
Expected output:
Actual output:
---
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?