Opened 15 years ago

Last modified 9 years ago

#1639 closed New Feature

Attribute change with Overrides — at Initial Version

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

Description

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 (0)

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