trix icon indicating copy to clipboard operation
trix copied to clipboard

When adding blockquote to a list, quote gets added inside the list instead of outside

Open roryokane opened this issue 10 years ago • 3 comments

Follow these steps with the demo to reproduce:

  1. screen shot 2015-10-21 at 12 29 22 am
  2. screen shot 2015-10-21 at 12 29 35 am
  3. screen shot 2015-10-21 at 12 29 45 am
  4. screen shot 2015-10-21 at 12 29 55 am

The desired result

desired result

I achieved this desired result with a workaround. I unapplied the list, then applied the quote, and finally reapplied the list.

roryokane avatar Oct 21 '15 04:10 roryokane

My personal view is that this is a desirable feature. Sometimes I want lists inside quotes, sometimes I want quotes inside lists. The way it operates at the moment (apparently), is that the block formatting you select first is the "outer" format, with the next selected the "inner" format, which I think is reasonable. The suggested route would mean lists always appearing within quotes (and not the other way around), which is perhaps to "opinionated" a design choice for a general purpose tool.

RobAley avatar Dec 31 '15 14:12 RobAley

@RobAley I am not at all suggesting that lists should always appear within quotes. You seem to be imagining a use-case where I have selected just the contents of one list item, and tried to apply blockquote to that. I have no problem with applying the quote on the inside in that case, because the selection is inside one list item.

However, if the selection is multi-paragraph, as in my screenshots, Trix should know that I want the quote on the outside. In the simplified one-list-item example, the quote should also be applied on the outside if the bullet point of the list is also selected, or if the ending newline is selected, both of which would indicate an intent to select the outside of the list item instead of its inside.

roryokane avatar Dec 31 '15 15:12 roryokane

Ah, apologies, I understand now. There is a third case, where multiple (or all) of the list items are selected, but within the list, but which should probably be treated as quotes inside a list, likewise multiple paragraphs within one or more list items. I'm not sure if it's a bug or not that at the moment, if you have multiple line breaks within an individual list item, and select a subset of the lines to quote, it adds a new bullet point for the lines (where as you probably want the quote to remain as a subsection of the same list item).

RobAley avatar Dec 31 '15 16:12 RobAley