Opened 15 years ago
Closed 15 years ago
#5290 closed Task (fixed)
Create a editor.getStylesSet function
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | Alfonso Martínez de Lizarrondo |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.3 |
Component: | Core : Styles | Version: | 3.2 |
Keywords: | Confirmed Review+ | Cc: |
Description
Currently both the styleCombo and the div dialog include code to check the config data and request the load of the styles data.
In the future other dialogs should have also the same combo like the div, and also it should be possible to manually add extra styles to the data for example by parsing the css file.
In order to do that the first step should be to simplify the loading of the styles data. Instead of doing
// Reuse the 'stylescombo' plugin's styles definition. customStylesConfig = editor.config.stylesCombo_stylesSet, stylesSetName = customStylesConfig && customStylesConfig.split( ':' )[ 0 ]; if ( stylesSetName ) { CKEDITOR.stylesSet.load( stylesSetName, function( stylesSet ) { var stylesDefinitions = stylesSet[ stylesSetName ],
we should provide a function that abstracts that code to
editor.getStyles( function( stylesDefinitions ) {
Attachments (2)
Change History (7)
Changed 15 years ago by
Attachment: | 5290.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
Summary: | Create a editor.GetStyles function → Create a editor.getStylesSet function |
I think that the next step would be to move the getStylesSet function as well as the default location for the stylesSet file to the Styles plugin, but this isn't part of this ticket.
comment:2 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
Based on your idea, we're talking now the global custom styles shared by all plugins, which means the 'stylescombo' plugin would not be the proper homeland for this method.
comment:3 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
The new patch moves the function to the styles plugin, as well as the "styles" subfolder and renames the config entry accordingly.
Proposed patch