Use the CKEditor editor to edit text and ckeditor text
Download CKEditor first.
: Click to open the link
Decompress the downloaded CKEditor and import it to the project.
Then introduce CKEditor on the page.
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
Add class = "ckeditor" to the textarea label to be edited and add the corresponding id and name attributes.
<textarea rows="10" cols="20" id="editor1" name="editor1" class="ckeditor"></textarea>
Then run the command on the server to use CKEditor.
Effect
Who will use the FCKeditor text editor?
Haha... It's really timely! I just used .....
First, decompress the FCKeditor 3.2 package.
In the calling file <script type = "text/javascript" src = "... ckeditor. js"> </script>, extract the package address
Insert text fields where you want to put the editor
<Textarea id = "editor" name = "content" class = "ckeditor"> </textarea>
Try...
How can I obtain the value of the text field and insert it to the database after using the ckeditor on a webpage?
Yes.
Var data = CKEDITOR. instances. Your editor id. getData ()
Submit to the background
String value = request. getParameter ("")
No matter what framework is used, it is actually the most basic getParameter encapsulation.
However, you need to encodeURI (data) first when passing the value, and then URLDecoder. decode (value, "UTF-8") in the background, otherwise there will be problems with special character transmission.