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