尊龙凯时人生就是搏

laravel ueditor Ó÷¨

laravel ÊÇÒ»¿îÖøÃûµÄ php ¿ª·¢¿ò¼Ü£¬ÔÚ¿ª·¢Àú³ÌÖУ¬¾­³£ÐèҪʹÓø»Îı¾±à¼­Æ÷À´±à¼­ÄÚÈÝ¡£ueditor ÊÇÒ»¿î¹¦Ð§Ç¿Ê¢µÄ¸»Îı¾±à¼­Æ÷£¬ËüÖ§³Ö¶àÖÖÓïÑÔºÍä¯ÀÀÆ÷£¬¿ÉÒÔÖª×ã´ó´ó¶¼µÄ±à¼­ÐèÇó¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚ laravel ÖÐʹÓà ueditor¡£

Ò»¡¢×°ÖÃ UEditor

µÚÒ»²½£¬×°Öà UEditor¡£¿ÉÒÔÖ±½Ó´Ó¹ÙÍø£¨http://ueditor.www.zuhaoqu.com/website/download.html£©ÏÂÔØ UEditor µÄ×îа汾¡£½«ÏÂÔØµÄ zip °ü½âѹºó£¬½«½âѹºóµÄÎļþ¼Ð¸´ÖƵ½ Laravel ÏîÄ¿µÄ public Ŀ¼ÏÂÃæ¡£

µÚ¶þ²½£¬ÉèÖà UEditor¡£UEditor µÄÉèÖÃÎļþÊÇ·ÅÔÚ config.json ÎļþÖеÄ£¬ÔÚ Laravel ÏîÄ¿ÖУ¬ÐèÒª½«¸ÃÎļþ·ÅÔÚ public/ueditor Ŀ¼ÏÂÃæ¡£ÉèÖÃÎļþÖаüÀ¨ÁËÐí¶à²ÎÊý£¬¿ª·¢Õß¿ÉÒÔƾ֤×Ô¼ºµÄÐèÇó¾ÙÐÐÉèÖã¬ÉèÖÃÎļþµÄ²ÎÊý˵Ã÷¼û UEditor ¹Ù·½Îĵµ£¨http://fex.www.zuhaoqu.com/ueditor/#server-config_1£©¡£

¶þ¡¢ÔÚ Laravel ÖÐʹÓà UEditor

µÚÒ»²½£¬ÒýÈë UEditor µÄÑùʽºÍ JavaScript Îļþ¡£ÔÚ Laravel µÄ Blade Ä£°åÖУ¬¿ÉÒÔʹÓÃÈçÏ´úÂëÀ´ÒýÈ룺

<link rel="stylesheet" type="text/css" href="/ueditor/themes/default/css/ueditor.min.css">
<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>

µÇ¼ºó¸´ÖÆ

ÕâÀïÐèҪעÖصÄÊÇ£¬ÐèҪƾ֤ UEditor µÄ×°Ö÷¾¶À´ÉèÖÃÑùʽºÍ JavaScript µÄÎļþ·¾¶¡£

µÚ¶þ²½£¬ÔÚ±íµ¥ÖÐÌí¼Ó UEditor µÄ±à¼­Æ÷¡£ÔÚ Laravel µÄ Blade Ä£°åÖУ¬¿ÉÒÔʹÓÃÈçÏ´úÂëÀ´Ìí¼ÓÒ»¸ö UEditor µÄ±à¼­Æ÷£º

<script id="editor" type="text/plain"></script>

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬id ÊôÐÔ¿ÉÒÔ×Ô¼º½ç˵£¬type ÊôÐÔ±ØÐèΪ text/plain¡£¸Ã´úÂë»áÔÚÒ³ÃæÖн¨ÉèÒ»¸ö¿ÕµÄ±à¼­Æ÷£¬Ê¹Óà JavaScript ´úÂë³õʼ»¯±à¼­Æ÷¡£

µÚÈý²½£¬³õʼ»¯ UEditor ±à¼­Æ÷¡£ÔÚ Laravel µÄ Blade Ä£°åÖУ¬¿ÉÒÔʹÓÃÈçÏ JavaScript ´úÂëÀ´³õʼ»¯ UEditor ±à¼­Æ÷£º

<script type="text/javascript">
    var editor = UE.getEditor('editor');
</script>

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬’editor’ ÊÇÉÏÒ»²½Öнç˵µÄ±à¼­Æ÷µÄ id¡£

Èý¡¢ÉúÑÄ UEditor µÄÄÚÈÝ

UEditor µÄÄÚÈÝÉúÑÄÔÚÒ»¸ö HTML Îı¾ÖУ¬Òò´Ë²»ÐèÒª¾ÙÐÐÌØÊâ´¦Àí¡£ÔÚ Laravel ÖУ¬¿ÉÒÔʹÓÃÈçÏ´úÂë»ñÈ¡ UEditor µÄÄÚÈÝ£º

$content = $request->input('content');

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬$request ÌåÏÖ¶ÔÄ¿½ñÇëÇóµÄ·â×°£¬¿ÉÒÔʹÓÃËüÀ´»ñÈ¡±íµ¥ÖеÄÊý¾Ý¡£ÈôÊÇÐèÒª½« UEditor µÄÄÚÈÝÉúÑĵ½Êý¾Ý¿âÖУ¬Ö±½Ó½« $content ´æÈëÊý¾Ý¿â¼´¿É¡£

ËÄ¡¢ÆäËû

UEditor »¹Ö§³ÖͼƬ¡¢ÊÓƵ¡¢ÎļþµÈÉÏ´«¹¦Ð§£¬¿ª·¢Õß¿ÉÒÔƾ֤×Ô¼ºµÄÐèÇó¾ÙÐÐÉèÖúÍʹÓã¬ÏêϸµÄʹÓÃÎĵµ¼û UEditor ¹Ù·½Îĵµ£¨http://fex.www.zuhaoqu.com/ueditor/#server-config_1£©¡£

×ܵÄÀ´Ëµ£¬ÔÚ Laravel ÖÐʹÓà UEditor ±à¼­Æ÷ºÜÊǼòÆÓ£¬Ö»ÐèÒªÏÂÔØ UEditor£¬ÉèÖÃÏà¹Ø²ÎÊý£¬È»ºóÔÚ Blade Ä£°åÖÐÒýÈëÑùʽºÍ JavaScript Îļþ£¬¼´¿ÉÔÚ±íµ¥ÖÐÌí¼Ó UEditor ±à¼­Æ÷¡£Í¬Ê±£¬UEditor »¹Ö§³Ö¸»ºñµÄ¹¦Ð§ºÍÉèÖã¬ÉÁ¿ª·¢Õß¿ÉÒÔÎÞаµØƾ֤×Ô¼ºµÄÐèÇó¾ÙÐÐʹÓúͶ¨ÖÆ¡£

ÒÔÉϾÍÊÇlaravel ueditor Ó÷¨µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ