Opened 9 years ago

Closed 9 years ago

#5107 closed Bug (wontfix)

Empty divs and spans with attributes should not be removed

Reported by: Martin Røssland Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

We have got some requests from our customers where they wish to create empty divs and spans with a set of attributes.

The editor today removes all divs and spans without a content (nightly build). I think this is great in those cases where divs and spans doesn't contain any attributes. But wouldn't it be better to spare the divs and spans that contains attributes? At least the divs?

The CreateDiv plugin have solved this by adding a non breakable space ( ). In previous versions this also happens when creating an empty div in source mode, but in the latest nightly build this is changed to removing the div. Anyway, by adding an non breakable space ( ), you will create an empty line, something that may confuse the author.

I don't think that empty divs or spans with attributes should be removed. Neither should an non breakable space ( ) be added.

Change History (3)

comment:1 Changed 9 years ago by Frederico Caldeira Knabben

If you're talking about tags being added at source mode, you could create protectedSource rules in your installation, so your empty tags remain untouched.

comment:2 Changed 9 years ago by Martin Røssland

Great, that actually solved my problem! :D

I still think that the CreateDiv plugin should create a div with no content.

Anyway, thanks a lot! :)

comment:3 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: newclosed

The CreateDiv thing is part of the DIV Container feature, so it's really supposed to contain something.

Other than that, only some <div>s should be preserved, but not all of them, even in your case, so it's hard to have it as a generic feature.

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