2013-01-15 112 views
0

我遇到麻烦CK4和获取样式头下拉自动设置的风格体现在款式,下拉。CK-编辑器,在custom.css

名为.css都应该后台和前台的共享和使用#page为CSS-ID

有没有办法告诉下拉解析与#页面前缀头。

我使用

CKEDITOR.config.bodyId = 'page'; 

和CSS

.cke_editable { 
} 

#page { 
    /* works - editor area goes black.. 
    font-family:Arial; 
    margin:10px; 
    font-family:Arial; 
    background-color:#000; 
    font-size: 10px; 
    color:#fff; 

} 

#page h1 { 
    /* works in editor-area, but not dropdown */ 
    font-family: Verdana; 
    color:#999; 
} 

.cke_editable h2 { 
    /* same as h1.. */ 
    font-family:Arial; 
    color:#f00; 
    font-size:16px; 
    background-color:#999; 
} 

h3 { 
    /* work BOTH in editor and style shows in dropdown. */ 
    color:#0f0; 
} 

回答

0

我由例如解析的CSS achived一个工作溶液

#page h1 {...} 

附着到CK等时:

['config']['css'] = 'parseMyCss.php?theFile=style.css 

和parseMyCss(简化):

$s = file_get_contents($theFile); 
$s = str_replace('#page ','', $s); 
header('content-type:text/css'); 
echo $s; 
0

的问题是,CKEditor的不将bodyId和/或bodyClass适用于款式组合:http://dev.ckeditor.com/ticket/7452

正如你可以看到几乎在两年前报道的错误,它一直没有活动从开发商大部分时间。