Opened 12 years ago

Closed 11 years ago

#8032 closed Bug (wontfix)

Insert block element between block elements

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


If there are 2 tables (one after another) in editor, there is no way to insert a div between. If there are 2 divs only with luck one div splits by pressing enter (with luck means if there are no paragraphs in div).
Problem is that cursor can't be placed outside a block element by mouse click. It would help, if users can move cursor outside with arrow keys. Is it possible to provide?

Change History (7)

comment:1 Changed 12 years ago by Jakub Ś

Status: newconfirmed
Version: 3.0

When table or div are inserted in the editor they are followed by p tags. If users inserts HTML with two tables next to each other then he probably knows what he is doing and how to handle it. In my opinion the editor provides some basic functionality (empty p after table or div) and it is up to user to write some sort of plug-in that will break out of current block element.

But this is just my opinion only. From the user point of view it would be nice if CKEditor would provide such functionality.

Such plug-in:

  1. Could have a list of allowed block elements from which it could break out off. By breaking out I mean look for the closing tag (e.g. closing div tag) and inserting p tag right after it
  2. Would have to look where the cursor actually is and from that point start its walk through DOM (perhaps looking on siblings and isLastChild would be the fastest) to find the closing tag and append p
  3. If cursor is not in editor – no action would be taken
  4. Why inserting p? Because from what I see it’s the basic content block in CKEditor which can be wrapped in other block elements (div, blockquote)

The only questions are is it possible (I think it is) and is it worth writing something like that(I leave that decision to others).

comment:2 Changed 12 years ago by Jakub Ś

Not sure if this issue isn't duplicating any other - at least I haven't found such.

comment:3 Changed 12 years ago by datalink

This happens only if users want to update old content, I think. Example of usage for this:

There is a page with a list of 10 products (or what ever). One product uses a template provided by the templates plugin of CKEditor. The template is a table with an image leftside and a headline and a text rightside, with specific formating aso. If the user want to set a new product on position 3, it's not possible to insert the product template on this position.

I think the problem is, that cursor can't positioned outside a block element. If I click into the editor, cursor is positioned inside everytime. I think this was working in old FCKeditor.

comment:4 Changed 12 years ago by Jakub Ś

Keywords: IBM added

#8683 was marked as duplicate.

comment:5 Changed 11 years ago by Frederico Caldeira Knabben

Keywords: v4 added

comment:6 Changed 11 years ago by Piotrek Koszuliński

Please check out our new plugin - "magicline" (sample: It seems to be exactly what you need.

comment:7 Changed 11 years ago by Garry Yao

Keywords: v4 removed
Resolution: wontfix
Status: confirmedclosed

We'd not provide a workaround for this in 3.x, since we've provided the "magicline" plugin in v4.

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