Opened 17 years ago

Closed 11 years ago

#1639 closed New Feature (fixed)

Attribute change with Overrides

Reported by: Jessica Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc:

Description (last modified by Alfonso Martínez de Lizarrondo)

According to editor/_source/classes/fckstyle.js

 *	Overrides : '<element name>'|{
 *		Element : '<element name>',
 *		Attributes : {
 *			'<att name>' : '<att value>'|/<att regex>/
 *		},
 *		Styles : {
 *			'<style name>' : '<style value>'|/<style regex>/
 *		},

I would like to request that the attributes section allow regular expressions for the attribute name. I would like to be able to override any span. I believe the attribute would need to allow something like:

Attributes : { /^.*$/ : /^.*$/ } 

The reason for this is I only want to use the span tags that I provide in the editor. When people paste text in from Word sometimes span tags are kept with style attributes. I am using span tags with class attributes. So if I want it to override any span tag with class and style attributes I don't see a way to do it in the editor right now.

So if someone pastes in

<span style="font-size: 20pt; font-family: Arial;">Hello world</span>

I want it to be able to come out with:

<span class="text">Hello world</span>

if they change it to be marked as text. Now it gives

<span class="text"><span style="font-size: 20pt; font-family: Arial;">Hello world</span></span>

In this example I can't just set the attribute to override any style because I need to be able to override classes as well.

Change History (3)

comment:1 Changed 17 years ago by Jessica

The attributes line didn't show up correctly. The carrots (special character above the 6) aren't showing up.

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralCore : Styles
Description: modified (diff)

Adjusted the formatting.

comment:3 Changed 11 years ago by Jakub Ś

Resolution: fixed
Status: newclosed

Content Transformations in CKE 4.1 seem to resolve this problem -!/guide/dev_advanced_content_filter.

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