CKEditor ASP.NET 怎么配置菜单

Teln_小凯 2014-09-16 09:33:40
引用ckeditor.dll后 看到文件夹下面有个config.js 里面代码是
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

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


怎么配置工具栏,不想要全部的,只想要居中 样式那块 求推荐些资料
...全文
166 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
果冻真甜 2014-09-16
  • 打赏
  • 举报
回复
最新版的ckeditor的"居中"做成插件了
Teln_小凯 2014-09-16
  • 打赏
  • 举报
回复
引用 3 楼 nongs 的回复:
你若只想要其居中,采用第一种配置,然后只包括'JustifyCenter'即可。如 config.toolbar_Full =[['JustifyCenter']]。貌似有些滴配置,要和ckeditor.js里面的东东匹配....
要下载js版本的才行吗
Teln_小凯 2014-09-16
  • 打赏
  • 举报
回复
引用 3 楼 nongs 的回复:
你若只想要其居中,采用第一种配置,然后只包括'JustifyCenter'即可。如 config.toolbar_Full =[['JustifyCenter']]。貌似有些滴配置,要和ckeditor.js里面的东东匹配....
我是这个版本 CKEditor 3.6.6.2 for ASP.NET
Teln_小凯 2014-09-16
  • 打赏
  • 举报
回复
引用 3 楼 nongs 的回复:
你若只想要其居中,采用第一种配置,然后只包括'JustifyCenter'即可。如 config.toolbar_Full =[['JustifyCenter']]。貌似有些滴配置,要和ckeditor.js里面的东东匹配....
我下载的是FUll版本的 复制你的config配置 没变化
回归了! 2014-09-16
  • 打赏
  • 举报
回复
你若只想要其居中,采用第一种配置,然后只包括'JustifyCenter'即可。如 config.toolbar_Full =[['JustifyCenter']]。貌似有些滴配置,要和ckeditor.js里面的东东匹配....
回归了! 2014-09-16
  • 打赏
  • 举报
回复
你这个不是最新版本的的全部测试版本。下载最新的,full 版本也看不到配置内容。 像你这个版本的可以这样配置:/** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; //config.extraPlugins = 'upload'; config.uiColor = '#F7F8F9' config.scayt_autoStartup = false config.language = 'zh-cn'; //中文 config.filebrowserBrowseUrl = '/Content/editor/ckfinder/ckfinder.html'; config.filebrowserImageBrowseUrl = '/Content/editor/ckfinder/ckfinder.html?Type=Images'; config.filebrowserFlashBrowseUrl = '/Content/editor/ckfinder/ckfinder.html?Type=Flash'; config.filebrowserUploadUrl = '/Content/editor/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files'; config.filebrowserImageUploadUrl = '/Content/editor/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images'; config.filebrowserFlashUploadUrl = '/Content/editor/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'; config.toolbar = 'Full'; config.toolbar_Full = [ ['Source', '-', 'Preview', 'Templates'], ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'SpellChecker', 'Scayt'], ['Undo', 'Redo', '-', 'Find', 'Replace', 'RemoveFormat'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['Link', 'Unlink', 'Anchor'], '/', ['Styles', 'Format', 'Font', 'FontSize'], ['TextColor', 'BGColor'], ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'], ['Image', 'upload', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar'], ['Maximize', 'ShowBlocks'] ]; config.toolbar_Basic = [ ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'], ['FontSize', 'TextColor', 'BGColor', 'Image', 'Flash', 'Smiley'], ['Source', 'Maximize'] ]; }; 还有,最新版本的标准版人家是这样配置的: /** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. // For complete reference see: // http://docs.ckeditor.com/#!/api/CKEDITOR.config // The toolbar groups arrangement, optimized for two toolbar rows. config.toolbarGroups = [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'links' }, { name: 'insert' }, { name: 'forms' }, { name: 'tools' }, { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'others' }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, { name: 'styles' }, { name: 'colors' }, { name: 'about' } ]; // Remove some buttons provided by the standard plugins, which are // not needed in the Standard(s) toolbar. config.removeButtons = 'Underline,Subscript,Superscript'; // Set the most common block elements. config.format_tags = 'p;h1;h2;h3;pre'; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; }; 望对你有用!!!
Teln_小凯 2014-09-16
  • 打赏
  • 举报
回复
能把CSDN这个文本编辑框给我最好了
回归了! 2014-09-16
  • 打赏
  • 举报
回复
引用 6 楼 qq873113580 的回复:
[quote=引用 3 楼 nongs 的回复:] 你若只想要其居中,采用第一种配置,然后只包括'JustifyCenter'即可。如 config.toolbar_Full =[['JustifyCenter']]。貌似有些滴配置,要和ckeditor.js里面的东东匹配....
要下载js版本的才行吗[/quote] 我的也是用在asp.net上,但是我用的通用版的ckeditor_4.4.1_full.....。但是貌似不管用什么版本的,config.js感觉怎么配置都行。以前我们项目中用了个3.x版本的,一测发现那个版本的jquery1.11.x版本一下的,不能在ie11上跑....后来就下个最新的,但是结果发现也没有配置文件。我就用以前的配置,发现照样可行。。。若是你原先的能全部显示的话,你只要在你原先的congfin.js里面添加这样一行代码config.toolbar_Full =[['JustifyCenter']];,应该就可以了。至少我的机子上这样能行!!!

62,072

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧