Opened 7 years ago

Last modified 4 years ago

#5233 confirmed Bug

Can not remove blockquote that was written in source mode or as default text

Reported by: Saare Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:


To reproduce

  • Open a new editor and go to Source mode
  • Write this text: <blockquote>Text</blockquote> and place the caret somewhere inside it
  • Click on the blockquote button

The blockquote is not removed.

Change History (5)

comment:1 Changed 7 years ago by fredck

  • Keywords Discussion added

Note that the provided HTML code is not valid, and that's why it gives unwanted results.

The blockquote element accepts only block elements inside of it. So, in the editor, we don't switch the <blockquote> to <p> when clicking on the button, but we instead remove the tag, leaving its contents, which in this case would break the document structure.

We usually don't bloat the code with fixes for weird code created outside the editor, but lets leave this one opened for reference and discussion.

comment:2 Changed 7 years ago by Saare

I don't think you should think about the document structure in this case. if an end-user would like to remove the block he should be aware of the consequences. if he is not happy with the result, he can always undo it.
The source code will not always be strict valid, and i think that in some minor cases such as this case the editor should handle even code that is not perfectly valid.

comment:3 Changed 6 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version changed from 3.1 to 3.0

Despite the invalid HTML <blockquote>Text</blockquote>, currently it is impossible to remove the blockquote which gives the impression to the users that something is broken in editor.

We do not event inform the user with any dialog or console log that his code is the reason of the problem. I doubt that inexperienced user who inserted such code will suddenly come up with an idea "Hey maybe my HTML is invalid."

comment:4 Changed 4 years ago by Reinmar

This issue is still reproducible in 4.0.2 (4.x (v4))

Last edited 4 years ago by j.swiderski (previous) (diff)

comment:5 Changed 4 years ago by j.swiderski

  • Keywords Discussion removed

NOTE: In HTML5 according to (last example), blockquote accepts also plain text as its content.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy