掃二維碼與項目經(jīng)理溝通
我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流
今天一個客戶要求在編輯器里增加可以拖動圖片的方法,研究了很久,發(fā)現(xiàn)這幾種編輯器只有在ie下才可以拖動圖片大小,包括網(wǎng)易用的編輯器,QQ空間的編輯器,先提前聲明一下。下面進入重點

修文網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、APP開發(fā)、響應式網(wǎng)站建設等網(wǎng)站項目制作,到程序開發(fā),運營維護。創(chuàng)新互聯(lián)于2013年創(chuàng)立到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運維經(jīng)驗,來保證我們的工作的順利進行。專注于網(wǎng)站建設就選創(chuàng)新互聯(lián)。
1.百度編輯器ueditor
先新建項目,生成以后在目錄下新建一個plugins文件夾
然后下載ueditor,地址:http://ueditor.baidu.com/website/download.html,注意編碼。下載以后解壓將整合文件夾放到plugins里,并且改名為ueditor
將項目名/Lib/Action/IndexAction.clas.php添加
- class IndexAction extends Action {
- function index(){
- $this->display();
- }
- }
然后在對應的模版里添加,在
中間添加在需要的地方添加
- toolbars:[
- ['fullscreen', 'source', '|', 'undo', 'redo', '|',
- 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
- 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
- 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
- 'directionalityltr', 'directionalityrtl', 'indent', '|',
- 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
- 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
- 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe','insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
- 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
- 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|',
- 'print', 'preview', 'searchreplace', 'help']
- ]
看需要刪除即可。
最近百度網(wǎng)盤有個活動,如果有興趣的朋友可以參加一下,還有個人收集的一些書籍
http://pan.baidu.com/share/link?shareid=3950160737&uk=3826886292
2.kindeditor
下載地址:http://www.kindsoft.net/down.php
解壓改名放到plugins下,
在模版里添加
- KindEditor.ready(function(K) {
- window.editor = K.create('#editor_id');
- });
顯示的樣式,自然就是51cto博客編輯器的樣子了。
3.xheditor ,號稱最干凈整潔的在線編輯器
下載地址:http://xheditor.com/download
復制到plugins下改名
在需要的模版中添加
即可,剩下的就是和后端的處理了。
一般我就比較喜歡使用這三種編輯器,而且各有特點,現(xiàn)在不喜歡fckeditor了,外觀不美觀,而且上傳之類的,容易出問題,包括有上傳漏洞。就不說了。有興趣的朋友可以加群:252799167一起學習進

我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流