Ticket #4463 (closed New Feature: fixed)

Opened 6 months ago

Last modified 4 months ago

V3 : Inline CSS support

Reported by: fredck Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

With FCKeditor we're able to include the plain CSS for some configuration options directly in the configuration file, avoiding having CSS files being downloaded. This can be used by the skin and the content area CSS, for example. This feature is to be ported to V3.

Attachments

4463.patch Download (2.1 KB) - added by garry.yao 5 months ago.
skin.js Download (45.9 KB) - added by garry.yao 5 months ago.
Inline CSS sample skin
4463_2.patch Download (12.1 KB) - added by garry.yao 5 months ago.
4463_3.patch Download (14.7 KB) - added by garry.yao 5 months ago.

Change History

Changed 5 months ago by garry.yao

Changed 5 months ago by garry.yao

Inline CSS sample skin

Changed 5 months ago by garry.yao

  • keywords Review? added
  • owner set to garry.yao
  • status changed from new to assigned

The attached sample skin file could be used for test.

Changed 5 months ago by fredck

  • keywords Review- added; Review? removed

The contents CSS, panels and dialogs are still missing.

Changed 5 months ago by garry.yao

Changed 5 months ago by garry.yao

  • keywords Review? added; Review- removed

The new patch introduce inline css support for all sorts of panels, menu, preview window, note that it also change the editor loading order to load skin before others (plugins, lang, theme), so plugins could easily reuse those inline styles defined in skin file.
Manual TCs added at :  http://ckeditor.t/tt/4463/1.html

Changed 5 months ago by fredck

  • keywords Review- added; Review? removed

Nice job. The loading order also looks good. Some small notes:

  • Instead of having CKEDITOR.skins, let's have "editor.skin", which contains the definition for that editor instance. It will be simpler to use. In any case if we would use the CKEDITOR.skins object, we should add the "get" method to it, just like we have for plugins.
  • The new CKEDITOR.fireOnce( 'pluginsLoaded' ) is wrong. It gives the sense that all plugin have been loaded, but the truth is that only the plugins for a specific instance have been loaded. This should be really an instance event only. For the skin.js needs, we could have CKEDITOR.on( 'dialogPlugin' ), which is fired by the dialog plugin file.

Changed 5 months ago by garry.yao

Changed 5 months ago by garry.yao

  • keywords Review? added; Review- removed

For the skin.js needs, we could have CKEDITOR.on( 'dialogPlugin' ), which is fired by the dialog plugin file.

The skin file may have dependencies on other plugin as well, even the theme, so a generic solution of firing an 'resource+type+ready' event is proposed in the patch.

Changed 4 months ago by fredck

  • keywords Review+ added; Review? removed

The 'resource+type+ready' is a nice idea.

Changed 4 months ago by fredck

This feature is to be committed into the 3.1 branch, not on trunk.

Changed 4 months ago by garry.yao

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [4464] on 3.1.x branch.

Changed 4 months ago by garry.yao

Oops, seems my committed result is missing certain chunk from the patch, re-fix with [4470] and [4471].

Note: See TracTickets for help on using tickets.