asp.net mvcÖÐckeditor+ckfinderµÄÅäÖ÷½·¨
¿ªÔ´ÍøÒ³±à¼Èí¼þFCKEditorÔÚ09Äê·¢²¼¸üе½3.0£¬²¢¸ÄÃûΪCKEditor¡£¸Ä½øºóµÄckeditor¸ü¼ÓÄ£¿é»°£¬ÅäÖøü¼ÓÁé»î£¬ºÍÒÔÇ°µÄfckeditorʹÓ÷½Ê½ÉÏÒ²ÓÐËù²»Í¬¡£ÔÚÎÒµÄmvcÏîÄ¿ÖÐÓÉÓÚÒªÓõ½ ckeditor£¬ÌØÒâÑо¿ÁËÏÂËüµÄʹÓ÷½·¨£¬Ð´ÏÂÀ´ºÍ´ó¼Ò·ÖÏí¡£
ÎÒÓõÄÊÇ×îа汾µÄ£ºckeditor_3.0.1 ÏÂÔصØÖ·£ºhttp://ckeditor.com/
ÏÂÔغóÖ±½Ó½âѹµÃµ½ckeditorÎļþ¼Ð£¬°üÀ¨ÈçÏÂÄÚÈÝ£º
ÆäÖÐsampleΪÀý×Ó£¬sourceΪԴÎļþ£¬ÎªÁ˼õÉÙeditorµÄÌå»ý£¬Ö±½Óɾ³ý¡£È»ºó½«Õû¸öÎļþ¼ÐÖ±½Ó¿½±´µ½ÍøÕ¾µÄ¸ùĿ¼ÏÂ.
ÔÚÄãÐèҪʹÓÃeditor¿Ø¼þµÄÒ³ÃæÍ·²¿Ìí¼Ó£º
<head>
...
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
ÔÚÒ³ÃæÏàӦλÖÃÉÏÌí¼Ó£º<textarea name="editor1"></textarea>
<script type="text/javascript">
window.onload = function()
{
CKEDITOR.replace( 'editor1' );
};
</script>
×¢Ò⣺js´úÂëÒ»¶¨ÒªÐ´ÔÚtextareaºó
Æäʵ¿ÉÒÔÕâÑùÀí½âeditor¿Ø¼þÖ»ÊǶÔtextarea×öÁËÒ»¸öƯÁÁµÄ°ü×°£¬ÎÒÃǵÄÊäÈëÆäʵ¶¼ÔÚÉÏÃæµÄtexareaÖУ¬×îÖÕÒ²ÊÇͨ¹ýtextarea
Ìá½»µ½·þÎñÆ÷¶Ë¡£
ÖªµÀÕâЩ£¬·þÎñÆ÷¶Ë´úÂë¾ÍÌ«¼òµ¥ÁË£º
[AcceptVerbs(HttpVerbs.Post)]
[ValidateInput(false)]
public ActionResult Create(FormCollection collection)
{
blog.Content = collection["editor1"];
¡£¡£¡£
}
collection["editor1"]¼´¿ÉÈ¡µÃeditorÖеÄÊäÈë¡£ÕâÀïÐèҪעÒâµÄÊÇÓÉÓÚtextareaÖÐÓÐÌØÊâ×Ö·û£¬³öÓÚ
°²È«ÔÒò£¬Ä¬ÈÏÇé¿ömvc¿ò¼Ü²»ÔÊÐíÌá½»µÄ£¬Ó¦ÔÚÏàÓ¦·½·¨ÉϼÓÉÏ[ValidateInput(false)]ÊôÐÔ¡£Ð§¹ûÈçÏ£º
»¹ÊÇÏ൱²»´íµÄ¡£
еÄeditorÖÐÈ¥³ýÁËÉÏ´«¹¦ÄÜ£¬Ò²¾ÍÊÇ˵ÎÒÃDz»ÄÜͨ¹ýÉÏ´«²åÈëͼƬ¡¢flashÁË¡£Èçͼ£ºeditorÖеIJåÈëͼƬ¶Ô»°¿ò²¢Ã»ÓÐÌṩÉÏ´«¹¦ÄÜ£º
ÐÒºÃÓиö²å¼þckfinder¿ÉÒÔ¸¨ÖúÎÒÃÇÍê³ÉÒÔϹ¦ÄÜ£¬²å¼þµÄÏÂÔصØַͬÑùÔÚ
http://ckeditor.com/ ×îа汾£ºckfinder_aspnet_1.4.1.1
½âѹºó£¬µÃµ½Ò»¸öÃûΪckfinderµÄÎļþ¼Ð£¬Í¬Ñùɾ³ýµôsource¡¢sampleĿ¼£¨ÔÒòͬÉÏ£©£¬¿½±´µ½ÍøÕ¾¸ùĿ¼Ï¡£Èçͼ£º
×¢Ò⣺ÕâÀﻹÓÐЩÅäÖñØÐëÒª×ö£º
°ÑÎļþ¼ÐÖеÄbinĿ¼ÏµÄdllÎļþÌí¼Óµ½ÍøÕ¾µÄÒýÓÃÖУ¬·ÀÖ¹³öÏÖÕÒ²»µ½ÀàµÄ´íÎó¡£
´ò¿ªconfig.ascx£¬ÐÞ¸Äpublic override bool CheckAuthenti
Ïà¹ØÎĵµ£º
·¢²¼ÖÐÓöµ½ÁËÁ½¸öÎÊÌâ
Ò»¡£session »á¶Ìʱ¼ä×Ô¶¯Ïûʧ
½â¾ö°ì·¨
1¡£ÔÚwww.google.comÖвésession ¶ªÊ§
2¡£ÔÚWindow·þÎñÖн«ASP.NET State Service Æô¶¯¡£
3¡£ÐÞ¸Äweb.config
<system.web>
add <sessionState mode="StateServer" timeout="60"/>
¶þ¡£sql server ³¬¹ý×î´óÁ¬½Ó³ØÊý
......
1.´«Í³WebForm¿ª·¢ÖдæÔÚµÄһЩÎÊÌâ
´«Í³µÄASP.NET¿ª·¢ÖУ¬Î¢ÈíµÄ¿ª·¢ÍŶÓΪ¿ª·¢ÕßÉè¼ÆÁËÒ»¸öÔÚ¿ÉÊÓ»¯Éè¼ÆÆ÷ÖÐÍϷſؼþ£¬±àд´úÂëÏìӦʼþµÄ¿ìËÙ¿ª·¢»·¾³¡£È»¶ø£¬ËüËù´øÀ´µÄ¸ºÃæЧӦÊÇ£º
ÓÉÓڿؼþ·â×°Á˺ܶණÎ÷£¬¿ª·¢ÕߺÜÄÑÁ˽âÕâ±³ºóµÄHTMLÊÇÈçºÎÔË×÷µÄ
ÈÝÒ׵õ½Ò»¸ö°üº¬´óÁ¿ViewStateµÄÒ³Ã棬ʹµÃÒ ......
FCKeditor ÔÚASP.Net ÖеÄʹÓÃ˵Ã÷
[ 2008-7-23 23:41:00 | By: »ª×Ó ]
2
ÍƼö
FCKeditor ÊÇÒ»¸öÔËÐÐÔÚä¯ÀÀÆ÷É쵀 Java Ó¦ÓóÌÐò¡£Ëû¿ÉÒÔ²»ÒÀÀµÈκηþÎñÆ÷¶ËÓïÑÔÔËÐС£²»¹ý£¬¸üºÃµÄʹÓ÷½·¨ÊÇÄãʹÓÃÒ»ÖÖ·þÎñÆ÷¶ËÓïÑÔÀ´µ÷ÓÃËû¡£
ÔÚASP.Net ÖУ¬ÓÐÒ»¸öÏֳɵŤ¾ß°ü¿ÉÒÔÈÃÄã°Ñ FCKeditor ×÷Î ......
1. Ò³ÇëÇó£º
Ò³ÇëÇó·¢ÉúÔÚÒ³ÉúÃüÖÜÆÚ¿ªÊ¼Ö®Ç°¡£Óû§ÇëÇóҳʱ£¬ASP.NET ½«È·¶¨ÊÇ·ñÐèÒª·ÖÎöºÍ±àÒëÒ³£¨´Ó¶ø¿ªÊ¼Ò³µÄÉúÃüÖÜÆÚ£©£¬»òÕßÊÇ·ñ¿ÉÒÔÔÚ²»ÔËÐÐÒ³µÄÇé¿öÏ·¢ËÍÒ³µÄ»º´æ°æ±¾ÒÔ½øÐÐÏìÓ¦¡£
2. ¿ªÊ¼£º
ÔÚ¿ªÊ¼½× ......