#33805 closed defect (bug) (wontfix)
Blockquotes that directly wrap lists quote each list item
Reported by: | krogsgard | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | TinyMCE | Keywords: | upstream |
Focuses: | administration | Cc: |
Description
In the visual editor, the blockquote TinyMCE button malfunctions when the highlighted text ends in, begins with, or fully consists of an unordered or ordered list. Example case:
The source ends up looking like this, in that case:
<blockquote>some text outside the list:</blockquote> <ul> <li> <blockquote>some item</blockquote> </li> <li> <blockquote>some item</blockquote> </li> <li> <blockquote>some item</blockquote> </li> <li> <blockquote>some item</blockquote> </li> </ul>
I can't really think of a scenario where quoting each list item separately would be preferred.
To get around it, I usually type something on a new line, blockquote it with both ends as regular text, then delete the unnecessary bits, but that's not a preferable experience. I've been experiencing this for a while, but kept forgetting to report it.
Change History (6)
This ticket was mentioned in Slack in #core-editor by krogsgard. View the logs.
9 years ago
#3
in reply to:
↑ 2
@
9 years ago
Replying to azaozz:
This depends on the current selection. If the <li> are selected, it adds the blockqupote tags inside them. If the <ul> is selected, it wraps it in a blockquote. Both cases are "correct" and may be used.
Hmm. I wonder how often someone would blockquote inside an <li> versus be trying to blockquote the whole thing?
The only way to control this is by looking at the "element path" at the bottom of the editor. When the whole <ul> needs to be wrapped in a blockquote, make sure it is selected or click on it to select it.
I always forget that is even there, nor really what to do when I do see it :/
Perhaps we can try to look at the selection before adding <blockquote>. Determine if all <li> nodes are selected, and select the parent node. But that may be hit and miss sometimes.
This is basically what I would advocate. I just can't imagine ever wanting to en-masse blockquote every individual <li>. And when it happens to me, it can be painstaking to fix it if I don't notice it's too many steps back to easily "undo".
#6
@
5 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
Hmm. I wonder how often someone would blockquote inside an <li> versus be trying to blockquote the whole thing?
Yeah, impossible to know, needs a "best guess" approach :)
Seems that best guess would be to look if all <li>
are selected and then select the whole ul/ol before running the blockquote command.
On the other hand this is now superseded by the block editor. Currently it doesn't seem possible to add a list in the Quote block.
Closing as wontfix for now. There is a workaround (although not that intuitive) and to fix it we will need to guess the user intent. Feel free to reopen with a patch if a fix is still needed for the classic editor.
This depends on the current selection. If the <li> are selected, it adds the blockqupote tags inside them. If the <ul> is selected, it wraps it in a blockquote. Both cases are "correct" and may be used.
The only way to control this is by looking at the "element path" at the bottom of the editor. When the whole <ul> needs to be wrapped in a blockquote, make sure it is selected or click on it to select it.
Perhaps we can try to look at the selection before adding <blockquote>. Determine if all <li> nodes are selected, and select the parent node. But that may be hit and miss sometimes.