小编Bar*_*rts的帖子

为CKEditor指定自定义配置文件

我正在尝试将CKEditor添加到我正在开发的页面中但是在获取它来获取我的自定义配置文件时遇到了问题?我在Visual Studio.NET 2008中使用CKEditor.我需要自定义显示的工具栏,因为Basic太小而Full会给用户提供大量的按钮.

我在aspx页面中声明编辑器如下:

<script type="text/javascript">
    CKEDITOR.replace(document.getElementById("<%= txtTourItinerary.ClientID %>"),
        { customConfig: 'myconfig.js' }
    );
</script>
Run Code Online (Sandbox Code Playgroud)

myconfig.js文件本身位于ckeditor目录的根目录中(config.js所在的位置).

但是,desipite呈现CKEditor本身,似乎完全忽略了我的自定义配置文件.我想知道是否有人有任何建议?

谢谢!

自定义配置文件的内容如下:

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    config.language = 'en';
    config.defaultLanguage = 'en';
    config.uiColor = '#000000';
};

CKEDITOR.config.toolbar_Full = [['Save', '-', 'Preview', '-' 'Print'],
    ['Undo', 'Redo'], ['Cut', 'Copy', 'Paste', 'PasteFromWord', 'SelectAll'], 
    ['Find', 'Replace'],
    '/',
    ['Bold', 'Italic', 'Unnderline', 'Strike', '-', 'Subscript', 'Superscript']];
Run Code Online (Sandbox Code Playgroud)

asp.net configuration toolbar ckeditor

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×1

ckeditor ×1

configuration ×1

toolbar ×1