ckeditor的详细配置.docx
- 文档编号:30298348
- 上传时间:2023-08-13
- 格式:DOCX
- 页数:12
- 大小:19.63KB
ckeditor的详细配置.docx
《ckeditor的详细配置.docx》由会员分享,可在线阅读,更多相关《ckeditor的详细配置.docx(12页珍藏版)》请在冰豆网上搜索。
ckeditor的详细配置
Ò»¡¢Ê¹Ó÷½·¨£º
1¡¢ÔÚÒ³Ãæ
ÖÐÒýÈëckeditorºËÐÄÎļþckeditor.js2¡¢ÔÚʹÓñà¼Æ÷µÄµØ·½²åÈëHTML¿Ø¼þ
Èç¹ûÊÇASP.NET»·¾³£¬Ò²¿ÉÓ÷þÎñÆ÷¶Ë¿Ø¼þ
TextBoxID="tbContent"runat="server"TextMode="MultiLine"class="ckeditor">
TextBox>
×¢ÒâÔڿؼþÖмÓÉÏclass="ckeditor"¡£
3¡¢½«ÏàÓ¦µÄ¿Ø¼þÌæ»»³É±à¼Æ÷´úÂë
CKEDITOR.replace('TextArea1');
//Èç¹ûÊÇÔÚASP.NET»·¾³ÏÂÓõķþÎñÆ÷¶Ë¿Ø¼þ
CKEDITOR.replace('tbContent');
//Èç¹û
CKEDITOR.replace('<%=tbContent.ClientID.Replace("_","$")%>');
4¡¢ÅäÖñà¼Æ÷
ckeditorµÄÅäÖö¼¼¯ÖÐÔÚckeditor/config.jsÎļþÖУ¬ÏÂÃæÊÇһЩ³£ÓõÄÅäÖòÎÊý£º
//½çÃæÓïÑÔ£¬Ä¬ÈÏΪ'en'
config.language='zh-cn';
//ÉèÖÿí¸ß
config.width=400;
config.height=400;
//±à¼Æ÷Ñùʽ£¬ÓÐÈýÖÖ£º'kama'£¨Ä¬ÈÏ£©¡¢'office2003'¡¢'v2'
config.skin='v2';
//±³¾°ÑÕÉ«
config.uiColor='#FFF';
//¹¤¾ßÀ¸£¨»ù´¡'Basic'¡¢È«ÄÜ'Full'¡¢×Ô¶¨Ò壩plugins/toolbar/plugin.js
config.toolbar='Basic';
config.toolbar='Full';
Õ⽫ÅäºÏ£º
config.toolbar_Full=[
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor']
];
//¹¤¾ßÀ¸ÊÇ·ñ¿ÉÒÔ±»ÊÕËõ
config.toolbarCanCollapse=true;
//¹¤¾ßÀ¸µÄλÖÃ
config.toolbarLocation='top';//¿ÉÑ¡£ºbottom
//¹¤¾ßÀ¸Ä¬ÈÏÊÇ·ñÕ¹¿ª
config.toolbarStartupExpanded=true;
//È¡Ïû¡°ÍÏקÒԸıä³ß´ç¡±¹¦ÄÜplugins/resize/plugin.js
config.resize_enabled=false;
//¸Ä±ä´óСµÄ×î´ó¸ß¶È
config.resize_maxHeight=3000;
//¸Ä±ä´óСµÄ×î´ó¿í¶È
config.resize_maxWidth=3000;
//¸Ä±ä´óСµÄ×îС¸ß¶È
config.resize_minHeight=250;
//¸Ä±ä´óСµÄ×îС¿í¶È
config.resize_minWidth=750;
//µ±Ìá½»°üº¬Óд˱à¼Æ÷µÄ±íµ¥Ê±£¬ÊÇ·ñ×Ô¶¯¸üÐÂÔªËØÄÚµÄÊý¾Ý
config.autoUpdateElement=true;
//ÉèÖÃÊÇʹÓþø¶ÔĿ¼»¹ÊÇÏà¶ÔĿ¼£¬Îª¿ÕΪÏà¶ÔĿ¼
config.baseHref=''
//±à¼Æ÷µÄz-indexÖµ
config.baseFloatZIndex=10000;
//ÉèÖÿì½Ý¼ü
config.keystrokes=[
[CKEDITOR.ALT+121/*F10*/,'toolbarFocus'],//»ñÈ¡½¹µã
[CKEDITOR.ALT+122/*F11*/,'elementsPathFocus'],//ÔªËؽ¹µã
[CKEDITOR.SHIFT+121/*F10*/,'contextMenu'],//Îı¾²Ëµ¥
[CKEDITOR.CTRL+90/*Z*/,'undo'],//³·Ïú
[CKEDITOR.CTRL+89/*Y*/,'redo'],//ÖØ×ö
[CKEDITOR.CTRL+CKEDITOR.SHIFT+90/*Z*/,'redo'],//
[CKEDITOR.CTRL+76/*L*/,'link'],//Á´½Ó
[CKEDITOR.CTRL+66/*B*/,'bold'],//´ÖÌå
[CKEDITOR.CTRL+73/*I*/,'italic'],//бÌå
[CKEDITOR.CTRL+85/*U*/,'underline'],//Ï»®Ïß
[CKEDITOR.ALT+109/*-*/,'toolbarCollapse']
]
//ÉèÖÿì½Ý¼ü¿ÉÄÜÓëä¯ÀÀÆ÷¿ì½Ý¼ü³åÍ»plugins/keystrokes/plugin.js.
config.blockedKeystrokes=[
CKEDITOR.CTRL+66/*B*/,
CKEDITOR.CTRL+73/*I*/,
CKEDITOR.CTRL+85/*U*/
]
//ÉèÖñà¼ÄÚÔªËصı³¾°É«µÄÈ¡Öµplugins/colorbutton/plugin.js.
config.colorButton_backStyle={
element:
'span',
styles:
{'background-color':
'#(color)'}
}
//ÉèÖÃÇ°¾°É«µÄÈ¡Öµplugins/colorbutton/plugin.js
config.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,
006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,
A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,
FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF¡¯
//ÊÇ·ñÔÚÑ¡ÔñÑÕɫʱÏÔʾ¡°ÆäËüÑÕÉ«¡±Ñ¡Ïîplugins/colorbutton/plugin.js
config.colorButton_enableMore=false
//Çø¿éµÄÇ°¾°É«Ä¬ÈÏÖµÉèÖÃplugins/colorbutton/plugin.js
config.colorButton_foreStyle={
element:
'span',
styles:
{'color':
'#(color)'}
};
//ËùÐèÒªÌí¼ÓµÄCSSÎļþÔÚ´ËÌí¼Ó¿ÉʹÓÃÏà¶Ô·¾¶ºÍÍøÕ¾µÄ¾ø¶Ô·¾¶
config.contentsCss='./contents.css';
//ÎÄ×Ö·½Ïò
config.contentsLangDirection='rtl';//´Ó×óµ½ÓÒ
//CKeditorµÄÅäÖÃÎļþÈô²»ÏëÅäÖÃÁô¿Õ¼´¿É
CKEDITOR.replace('myfiled',{customConfig:
'./config.js'});
//½çÃæ±à¼¿òµÄ±³¾°É«plugins/dialog/plugin.js
config.dialog_backgroundCoverColor='rgb(255,254,253)';//¿ÉÉèÖòο¼
config.dialog_backgroundCoverColor='white'//ĬÈÏ
//±³¾°µÄ²»Í¸Ã÷¶ÈÊýÖµÓ¦¸ÃÔÚ£º0.0¡«1.0Ö®¼äplugins/dialog/plugin.js
config.dialog_backgroundCoverOpacity=0.5
//Òƶ¯»òÕ߸ıäÔªËØʱ±ß¿òµÄÎü¸½¾àÀ뵥λ£ºÏñËØplugins/dialog/plugin.js
config.dialog_magnetDistance=20;
//ÊÇ·ñ¾Ü¾ø±¾µØƴд¼ì²éºÍÌáʾĬÈÏΪ¾Ü¾øÄ¿Ç°½öfirefoxºÍsafariÖ§³Öplugins/wysiwygarea/plugin.js.
config.disableNativeSpellChecker=true
//½øÐбí¸ñ±à¼¹¦ÄÜÈ磺Ìí¼ÓÐлòÁÐÄ¿Ç°½öfirefoxÖ§³Öplugins/wysiwygarea/plugin.js
config.disableNativeTableHandles=true;//ĬÈÏΪ²»¿ªÆô
//ÊÇ·ñ¿ªÆôͼƬºÍ±í¸ñµÄ¸Ä±ä´óСµÄ¹¦ÄÜconfig.disableObjectResizing=true;
config.disableObjectResizing=false//ĬÈÏΪ¿ªÆô
//ÉèÖÃHTMLÎĵµÀàÐÍ
config.docType='
DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:
//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22';
//ÊÇ·ñ¶Ô±à¼ÇøÓò½øÐÐäÖȾplugins/editingblock/plugin.js
config.editingBlock=true;
//±à¼Æ÷Öлسµ²úÉúµÄ±êÇ©
config.enterMode=CKEDITOR.ENTER_P;//¿ÉÑ¡£ºCKEDITOR.ENTER_BR»òCKEDITOR.ENTER_DIV
//ÊÇ·ñʹÓÃHTMLʵÌå½øÐÐÊä³öplugins/entities/plugin.js
config.entities=true;
//¶¨Òå¸ü¶àµÄʵÌåplugins/entities/plugin.js
config.entities_additional='#39';//ÆäÖÐ#´úÌæÁË&
//ÊÇ·ñת»»Ò»Ð©ÄÑÒÔÏÔʾµÄ×Ö·ûΪÏàÓ¦µÄHTML×Ö·ûplugins/entities/plugin.js
config.entities_greek=true;
//ÊÇ·ñת»»Ò»Ð©À¶¡×Ö·ûΪHTMLplugins/entities/plugin.js
config.entities_latin=true;
//ÊÇ·ñת»»Ò»Ð©ÌØÊâ×Ö·ûΪASCII×Ö·ûÈç"ThisisChinese:
ººÓï."ת»»Îª"ThisisChinese:
汉语."plugins/entities/plugin.js
config.entities_processNumerical=false;
//Ìí¼ÓÐÂ×é¼þ
config.extraPlugins='myplugin';//·ÇĬÈϽöʾÀý
//ʹÓÃËÑË÷ʱµÄ¸ßÁÁÉ«plugins/find/plugin.js
config.find_highlight={
element:
'span',
styles:
{'background-color':
'#ff0','color':
'#00f'}
};
//ĬÈϵÄ×ÖÌåÃûplugins/font/plugin.js
config.font_defaultLabel='Arial';
//×ÖÌå±à¼Ê±µÄ×Ö·û¼¯¿ÉÒÔÌí¼Ó³£ÓõÄÖÐÎÄ×Ö·û£ºËÎÌå¡¢¿¬Ìå¡¢ºÚÌåµÈplugins/font/plugin.js
config.font_names='Arial;TimesNewRoman;Verdana';
//ÎÄ×ÖµÄĬÈÏʽÑùplugins/font/plugin.js
config.font_style={
element:
'span',
styles:
{'font-family':
'#(family)'},
overrides:
[{element:
'font',attributes:
{'face':
null}}]
};
//×ÖÌåĬÈÏ´óСplugins/font/plugin.js
config.fontSize_defaultLabel='12px';
//×ÖÌå±à¼Ê±¿ÉÑ¡µÄ×ÖÌå´óСplugins/font/plugin.js
config.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'
//ÉèÖÃ×ÖÌå´óСʱʹÓõÄʽÑùplugins/font/plugin.js
config.fontSize_style={
element:
'span',
styles:
{'font-size':
'#(size)'},
overrides:
[{element:
'font',attributes:
{'size':
null}}]
};
//ÊÇ·ñÇ¿ÖƸ´ÖÆÀ´µÄÄÚÈÝÈ¥³ý¸ñʽplugins/pastetext/plugin.js
config.forcePasteAsPlainText=false//²»È¥³ý
//ÊÇ·ñÇ¿ÖÆÓá°&¡±À´´úÌæ¡°&¡±plugins/htmldataprocessor/plugin.js
config.forceSimpleAmpersand=false;
//¶Ôaddress±êÇ©½øÐиñʽ»¯plugins/format/plugin.js
config.format_address={element:
'address',attributes:
{class:
'styledAddress'}};
//¶ÔDIV±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_div={element:
'div',attributes:
{class:
'normalDiv'}};
//¶ÔH1±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h1={element:
'h1',attributes:
{class:
'contentTitle1'}};
//¶ÔH2±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h2={element:
'h2',attributes:
{class:
'contentTitle2'}};
//¶ÔH3±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h1={element:
'h3',attributes:
{class:
'contentTitle3'}};
//¶ÔH4±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h1={element:
'h4',attributes:
{class:
'contentTitle4'}};
//¶ÔH5±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h1={element:
'h5',attributes:
{class:
'contentTitle5'}};
//¶ÔH6±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_h1={element:
'h6',attributes:
{class:
'contentTitle6'}};
//¶ÔP±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_p={element:
'p',attributes:
{class:
'normalPara'}};
//¶ÔPRE±êÇ©×Ô¶¯½øÐиñʽ»¯plugins/format/plugin.js
config.format_pre={element:
'pre',attributes:
{class:
'code'}};
//Ó÷ֺŷָôµÄ±êÇ©Ãû×ÖÔÚ¹¤¾ßÀ¸ÉÏÏÔʾplugins/format/plugin.js
config.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';
//ÊÇ·ñʹÓÃÍêÕûµÄhtml±à¼Ä£Ê½ÈçʹÓã¬ÆäÔ´Â뽫°üº¬£º
µÈ±êÇ©config.fullPage=false;
//ÊÇ·ñºöÂÔ¶ÎÂäÖеĿÕ×Ö·ûÈô²»ºöÂÔÔò×Ö·û½«ÒÔ¡°¡±±íʾplugins/wysiwygarea/plugin.js
config.ignoreEmptyParagraph=true;
//ÔÚÇå³ýͼƬÊôÐÔ¿òÖеÄÁ´½ÓÊôÐÔʱÊÇ·ñͬʱÇå³ýÁ½±ßµÄ±êÇ©plugins/image/plugin.js
config.image_removeLinkByEmptyURL=true;
//Ò»×éÓöººÅ·Ö¸ôµÄ±êÇ©Ãû³Æ£¬ÏÔʾÔÚ×óϽǵIJã´ÎǶÌ×ÖÐplugins/menu/plugin.js.
config.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea';
//ÏÔʾ×Ӳ˵¥Ê±µÄÑÓ³Ù£¬µ¥Î»£ºmsplugins/menu/plugin.js
config.menu_subMenuDelay=400;
//µ±Ö´ÐС°Ð½¨¡±ÃüÁîʱ£¬±à¼Æ÷ÖеÄÄÚÈÝplugins/newpage/plugin.js
config.newpage_html='';
//µ±´ÓwordÀ︴ÖÆÎÄ×Ö½øÀ´Ê±£¬ÊÇ·ñ½øÐÐÎÄ×ֵĸñʽ»¯È¥³ýplugins/pastefromword/plugin.js
config.pasteFromWo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ckeditor 详细 配置