Ticket #1639 (new New Feature)

Opened 12 months ago

Last modified 12 months ago

Attribute change with Overrides

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

Description (last modified by alfonsoml) (diff)

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

Changed 12 months ago by jessica

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

Changed 12 months ago by alfonsoml

  • component changed from General to Core : Styles
  • description modified (diff)

Adjusted the formatting.

Note: See TracTickets for help on using tickets.