Opened 16 years ago

Closed 16 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:

Description

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:

<div>Text</div>.

When it really should produce

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

Attachments (1)

Picture 1.png (11.9 KB) - added by Jeff Johnson 16 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 16 years ago by Alfonso Martínez de Lizarrondo

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 16 years ago by Jeff Johnson

Attachment: Picture 1.png added

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

comment:2 Changed 16 years ago by Jeff Johnson

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" />
	</Style>

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 16 years ago by Alfonso Martínez de Lizarrondo

Resolution: wontfix
Status: newclosed

dup of #1493 (marked wontfix)

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