Opened 10 years ago

Closed 9 years ago

#1465 closed New Feature (wontfix)

corestyles/stylelabel applied on div entermode

Reported by: madis Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Discussion Pending Cc:


Using ie. div in EnterMode produces a clean div tag that embraces its content upon pressing enter or when loading the editor. Ie. <div>New paragraph</div>

Could it be possible that the div-tag created by EnterMode to be affected by DefaultStyleLabel and/or CoreStyles?

For instance, if having

FCKConfig.EnterMode = 'div' ;
FCKConfig.DefaultStyleLabel = 'myClass1' ;
FCKConfig.CoreStyles = 
'div' : { Element : 'div', Attributes : { 'id' : 'myDiv1' } },

the EnterMode currently produces:


When it really should produce

<div class="myClass1" id="myDiv1">Text</div>

Attachments (1)

Picture 1.png (11.9 KB) - added by sojweb 9 years ago.
Enter mode and style element the same causes mishandling of styles in the editor

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by alfonsoml

  • Keywords Discussion Pending added; EnterMode CoreStyles DefaultStyleLabel removed

Only one element can have an ID, so trying to create new divs with that Id would be illegal.

And instead of having all the divs in your content with the same class, it would be easier if you just apply your styles to a plain div, and use only classes when you need something different.

I would vote for WontFix.

Changed 9 years ago by sojweb

Enter mode and style element the same causes mishandling of styles in the editor

comment:2 Changed 9 years ago by sojweb

I've a problem that I think is related (correct me if I'm wrong): I also have enter mode set to 'div', and I have some custom style declarations in the XML, for instance:

	<Style name="Right sidebar" element="div">
		<Attribute name="class" value="grayRightSidebar" />

When I'm in the editor, all the styles whose 'element' value is the same as the 'EnterMode' value appear with the little triangle next to them, and the editor refuses to apply them to the content. It doesn't seem to matter that I've things set to 'div', only that the they're the same. If I set the enter mode to 'p' and change the 'element' attribute value to 'p' also, the same things happens.

Ideas for a fix or workaround?

comment:3 Changed 9 years ago by alfonsoml

  • Resolution set to wontfix
  • Status changed from new to closed

dup of #1493 (marked wontfix)

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