Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10036 closed Bug (wontfix)

Inline edtor should apply block level formats only to the users selection

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


Not sure if this is the right place to post this- sorry if its not- I was directed over here from

At the moment when the user makes a selection and selects 'Heading 1' from the format drop down the whole block changes. While I know why this is (h1 is block level) I dont feel that the editor is doing what I told it to do since I went to the trouble of making a selection and therefore expect only that selection to be affected by my subsequent actions. deals with this by closing the existing block before the selection and opening it again afterwards and applying the new block level tag around the selection- which seems far more like it is doing what its told.

While I appreciate that we all know what an inline style is, most users do not. They really are going to expect the changes they make to affect the text they have selected I feel. Its different if they just put the cursor in a block and dont make a selection. And I understand that 'thats not how it is supposed to work' and that users should learn that h1 are block level etc- but they simply wont. We understand it because we work on the web all the time. If our sole experience was Word we would expect 'style' changes (and we would include 'Heading 1' in that) to only affect the selection we have made, not go ahead without our say so and screw up the whole paragraph...So I would suggest that way of doing things is simply far better for the user and maybe something CKEditor and Aloha should emulate...

Change History (4)

comment:1 Changed 11 years ago by Jakub Ś

Resolution: wontfix
Status: newclosed

This is by design and we have decided that such behaviour is better than applying block level to selection and then splitting containing block element like P in two.

The latter is in our opinion far more unexpected than first.

I will add that popular desktop editors like Word also do that - this is one of the reasons why we have decided to take such approach. Users who had to do only with MS Word (which is much more common) and not with whole bunch of online editors will definitely be less surprised.

Please see also and for more details.

comment:2 Changed 11 years ago by davidosullivan

ok well thats not how Word 2010 works, maybe the later versions do...

comment:3 Changed 11 years ago by Jakub Ś

ok well thats not how Word 2010 works, maybe the later versions do...

Yes and no.
If you just put cursor and then click e.g. heading one whole line will be changed. If you select part of text and make it heading one then yes only this part will be changed but please note that in desktop application block doesn't get split as it would happen in browser.
@davidosullivan I don't want to argue about this. We simply think that it is better to change whole line then create three out of one. Both approaches have pros and cons. In fact there is no perfect solution here – in each scenario user can say “what happen? I clicked and I have three lines” or “I’ve selected small part and whole line changed”.

comment:4 Changed 11 years ago by Piotrek Koszuliński is the answer. HTML editors are different than editors like Word, Libre Office or Google Docs. We need to care about semantics of the output and if we allow to apply Heading 1 style (which is basically an h1 element) to a selection we have to do this for entire blocks. There's no clean way in HTML to start h1 in the middle of the line.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy