thinkphp Text Editor

Source: Internet
Author: User

Text Editor: Can be downloaded from the Internet---ueditor folder contains PHP and utf8-php Two folders are used mainly in the use ofGet contentAndWrite ContentTwo x buttonsGet content:
<! DOCTYPE html Public "-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >//instantiate a text editor, this sentence must havevarUE = Ue.geteditor (' editor ');functiongetcontent () {//main Function statement//write content in Text editor, click Get Content button, display content in Xianshi<div>document.getElementById ("Xianshi"). InnerHTML = Ue.geteditor (' editor ').getcontent ();} </script>View Codecontent written in the text editor:

xianshi<div> content in the real world:

Write content:
<! DOCTYPE html Public "-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >//instantiate a text editor, this sentence must havevarUE = Ue.geteditor (' editor '); functionsetcontent (isappendto) {varstr = "<p style= ' white-space:normal; ' ><span style= ' Background-color:rgb (84, 141, 212); > Skoda High-tech Easter </span></p><p style= ' white-space:normal; ' ><span style= ' text-decoration:underline; Color:rgb (0, 176, 80); ><em> watch TV show and go home to the Caesar </em></span></p><p><br></p> "; //Main Function StatementUe.geteditor (' editor '). SetContent (str,isappendto);}</script>View CodeWhat is real before writing to the content:

The get content code is added to the corresponding method, and then the content is written to show the same content:

thinkphp Text Editor

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.