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灰顯樣式下拉菜單,然後單擊向下箭頭不執行任何操作。我希望下拉菜單處於活動狀態,並提供「精選行」樣式。
如何在選擇表格時顯示「票價表」樣式,並在選擇表格行時顯示「精選行」樣式以顯示?