Make WordPress Core

Opened 16 years ago

Closed 11 years ago

#15457 closed enhancement (worksforme)

Add URI support to add_editor_style()

Reported by: dwieeb Owned by:
Priority: normal Milestone:
Component: TinyMCE Version: 3.0
Severity: normal Keywords: close
Cc: Focuses:

Description

Currently add_editor_style() only allows for CSS files to be added that are relative in location to the current theme's stylesheet_directory or template_directory, meaning it can only be used by theme authors. Let's keep that functionality, but add the ability to attach a CSS file via URI. This way, plugin authors can use it to add editor styles.

An example of why this might be necessary is a microformat plugin where the user can style microformats differently by adding certain CSS files by the user's choice. Right now, we can only see a change like that when we click preview.

So it would be nice if plugins could use this function as well as themes.

I've attached a potential patch.

Attachments (2)

my-patch.txt (1.5 KB ) - added by dwieeb 16 years ago.
Potential patch. Mildly tested.
my-patch.diff (1.5 KB ) - added by dwieeb 16 years ago.
Reuploaded as a diff file

Download all attachments as: .zip

Change History (9)

@dwieeb
16 years ago

Potential patch. Mildly tested.

#1 @PeteMall
16 years ago

please use .diff or .patch for the patch so it's easier to read

@dwieeb
16 years ago

Reuploaded as a diff file

#2 @dwieeb
16 years ago

Right-o

#3 @nacin
16 years ago

  • Keywords 3.2-early added; add_editor_style tinymce removed
  • Milestone Awaiting ReviewFuture Release

#4 @chriscct7
12 years ago

  • Keywords dev-feedback needs-refresh added; 3.2-early removed

If still desired, the patch needs to be refreshed.

#5 @azaozz
12 years ago

  • Keywords close added; dev-feedback needs-refresh removed

There is the mce_css filter for this, since 2.1. Can be used to add any stylesheet inside the editor iframe.

#6 @iseulde
12 years ago

  • Milestone Future ReleaseAwaiting Review
  • Version 3.0.13.0

#7 @azaozz
11 years ago

  • Milestone Awaiting Review
  • Resolutionworksforme
  • Status newclosed

Closing as "worksforme". Any stylesheet can be added easily by using the mce_css filter.

Note: See TracTickets for help on using tickets.