Integrate various online editors in thinkphp

Source: Internet
Author: User

Today, a customer requirements in the editor can drag the picture of the method, studied for a long time, found that these kinds of editors only in IE can drag the picture size, including NetEase with the editor, QQ Space Editor, the first statement in advance. Below the point of entry

1. Baidu Editor Ueditor

Create a new project, build a new plugins folder under the directory

Then download Ueditor, Address: http://ueditor.baidu.com/website/download.html, note coding. After downloading the consolidation folder into the plugins, and renamed to Ueditor

Add the project name/lib/action/indexaction.clas.php

Class Indexaction extends Action {
    function index () {
        $this->display ();
    }
}

Then add in the corresponding template, add in the middle of the

<script type= "Text/javascript" src= "/edit/plugins/ueditor/ueditor.config.js" ></script>
< Script type= "Text/javascript" src= "/edit/plugins/ueditor/ueditor.all.js" ></script>

Add where needed

<textarea id= "Myeditor" name= "Content" style= "width:700px;height:300px;" >
</textarea>
<script type= "Text/javascript" >
    ue.geteditor (' myeditor ')
</ Script>

This is the Textera way, also can use Div,p all can, the official recommendation is

<script type= "Text/plain" id= "Myeditor" >
    //Remove article contents from database print here
</script>
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 ', ' Fon Tfamily ', ' fontsize ', ' | ', ' directionalityltr ', ' Directionalityrtl ', ' indent ', ' | ', ' justi Fyleft ', ' justifycenter ', ' justifyright ', ' justifyjustify ', ' | ', ' touppercase ', ' tolowercase ', ' | ', ' link ' , ' unlink ', ' anchor ', ' | ', ' imagenone ', ' imageleft ', ' imageright ', ' imagecenter ', ' | ', ' insertimage ', ' emo tion ', ' scrawl ', ' insertvideo ', ' music ', ' attachment ', ' map ', ' gmap ', ' insertframe ', ' insertcode ', ' webapp ', ' pagebreak '
  , ' template ', ' background ', ' | ',              ' Horizontal ', ' date ', ' time ', ' spechars ', ' snapscreen ', ' wordimage ', ' | ', ' inserttable ', ' de Letetable ', ' insertparagraphbeforetable ', ' insertrow ', ' deleterow ', ' insertcol ', ' deletecol ', ' mergecells ', ' Mergeright ', ' mergedown ', ' splittocells ', ' splittorows ', ' splittocols ', ' | ', ' print ', ' preview ', ' Searchre Place ', ' help ']

See if you need to delete it.

Recently, Baidu Network has an activity, if interested friends can attend, there are some books collected by individuals

http://pan.baidu.com/share/link?shareid=3950160737&uk=3826886292

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.