Remove Format changes selection when applied to unsupported element #2451
Labels
status:confirmed
An issue confirmed by the development team.
support
An issue reported by a commercially licensed client.
target:minor
Any docs related issue that can be merged into a master or major branch.
type:bug
A bug.
Milestone
Type of report
Bug
Provide detailed reproduction steps (if any)
Expected result
Format dropdown should display "Heading 2".
Actual result
Format dropdown displays "Format".
Please note however that new Format gets applied properly. Only the selection is being moved from
H1
element to its parentol
. If you change the selection and click inside theH1
, the Format dropdown will show it correctly again.Other details
When Remove Format is applied, it looks like selection is being moved from the actual element to its parent. This behavior is in my opinion correct for inline elements because when format is removed, the inline element (like span or strong) is being removed as well. When it comes to block-level elements, things get more complicated. By default removeFormatTags is only be applied to inline elements and documentation say that only inline elements can be used on that list. There is however nothing stopping from setting this configuration option to
config.removeFormatTags = 'h1,div,blockquote'
. What is more, such setup will work properly (provided that start of element is selected) when removing formatting form H1 for example (tag will get removed). Since the plugin works ok for both types of tags and the only thing which says otherwise is one sentence in documentation, what should we do?Screen cast: remove format.zip
The text was updated successfully, but these errors were encountered: