×ðÁú¿­Ê±¹ÙÍøµÇ¼

laravel ueditor Ó÷¨

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

Ò»¡¢×°ÖÃ UEditor

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

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

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

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

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ