Opened 13 years ago
Last modified 9 years ago
#8406 confirmed New Feature
StyleSheetParser and Fullpage
Reported by: | Simon | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
Currently if FullPage=true then no style sheets are loaded via ContentsCss and hence the styles drop down isn't populated with the styles available for the page.
Ideally the stylesheetparser should load all the external styles sheets referenced in the html if fullpage=true
Change History (3)
comment:1 Changed 13 years ago by
Keywords: | Fullpage StyleSheetParser removed |
---|---|
Status: | new → pending |
comment:2 Changed 13 years ago by
I will try and explain:
If StyleSheetParser is loaded and FullPage=true then it should load all the information from the style tags in the head section.
If StyleSheetParse is loaded and Fullpage=false then it should load the styles listed in the contentsCss property
Otherwise when Fullpage=true there is no way to dynamically setup all the styles required for the page
comment:3 Changed 13 years ago by
Status: | pending → confirmed |
---|---|
Version: | → 3.0 |
Styles from contentsCss won't work in fullPage mode by Design. The problem is that they are applied to styles dropdown which confuses users. This is a bug but is covered by #7735.
Entries in styles dropdown can be set using: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.stylesSet
User might want to use something like (look at “red red 2”):
CKEDITOR.replace( 'editor1', { fullPage:true, stylesSet : [ { name : 'Red Red', element : 'h2', styles : {'background-color':'red', 'text-decoration':'underline'} }, {name : 'red red 2', element : 'h2', attributes : { 'class' : 'red',}} ] });
and inside edited page, insert a link pointing to mystyles.css file:
<link href="../mystyles.css" rel="stylesheet" type="text/css" />
which contains:
h2.red{ background-color:red; text-decoration: underline; }
The problem is that styles from edited page won’t be populated to styles dropdown list so there will be no visual presentation of how style might look like. But when this style will be used – user will see red background and underlined text - red class will be applied.
Probably some dynamic styles loading for styles dropdown would be needed.
Just to sum up:
#7735 - is a bug in which styles from contentsCss are applied to drop-down list but not to editor content area.
This issue - #8406 - is a is a feature/bug in which styles, attached to head section of edited page are applied to editor content area but they are not dynamically applied to editor drop-down list even if this drop-down is using styles from such file.
I'm confused. Are you talking about style tags placed in head section:
<link href="sample.css" rel="stylesheet" type="text/css" />
or styles added to contentsCss property?