2015-06-15 35 views
2

我有以下CKEditor的4码在我的Drupal 7主题文件夹,在文件ckeditor.styles.js:CKEditor对象样式在Drupal 7中不起作用?

/* 
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. 
For licensing, see LICENSE.html or http://ckeditor.com/license 
*/ 
/* whenever upgrading CKeditor, this file has to be copied to replace it */ 

CKEDITOR.stylesSet.add('default', 
[ 
    /* Block Styles */ 

    { name : 'Lead Paragraph'  , element : 'p', attributes : { 'class' : 'lead' } }, 

    /* Inline Styles */ 

    { name : 'Cited Work'  , element : 'cite' }, 

    /* Object Styles */ 

    { 
    name : 'Image on Left', 
    element : 'img', 
    attributes : 
    { 
     'style' : 'padding: 5px; margin-right: 5px', 
     'border' : '2', 
     'align' : 'left' 
    } 
    }, 

    { 
    name : 'Image on Right', 
    element : 'img', 
    attributes : 
    { 
     'style' : 'padding: 5px; margin-left: 5px', 
     'border' : '2', 
     'align' : 'right' 
    } 
    }, 

    { 
    name : 'Fare table', 
    element : 'table', 
    attributes : 
    { 
     'class' : 'rate-table'  
    } 
    }, 

    { 
    name : 'Featured row', 
    element : 'tr', 
    attributes : 
    { 
     'class' : 'super' 
    } 
    }, 

]); 

我编辑在其身上字段的表的页面。我点击表格,然后点击标签列表中的表格。 CKEditor将活动标签列为“主体表”。我点击“样式”下拉菜单,列出的唯一样式是“前导段落”。我也希望看到“票价表”。

我点击表格,然后点击标签列表上的tr。 CKEditor灰显样式下拉菜单,然后单击向下箭头不执行任何操作。我希望下拉菜单处于活动状态,并提供“精选行”样式。

如何在选择表格时显示“票价表”样式,并在选择表格行时显示“精选行”样式以显示?

回答