Learning and using the online editor FCKeditor

Source: Internet
Author: User

1. Download FCKeditor. There are many examples in the directory for viewing. What I need is JSP-related code, which can be greatly simplified and irrelevant content can be deleted.
2. The simplified directory can be found in my download resources.
3.there is a sample.html file in the resource. The file is short. The simplified content is as follows:
 

Code:
  1. <HTML>
  2. <Head>
  3. <Link href = "sample.css" rel = "stylesheet" type = "text/CSS"/>
  4. <SCRIPT type = "text/JavaScript" src = "FCKeditor. js"> </SCRIPT>
  5. <SCRIPT type = "text/JavaScript">
  6. Window. onload = function (){
  7. VaR sbasepath = "";
  8. VaR ofckeditor = new FCKeditor ('fckeditor1 ');
  9. Ofckeditor. basepath = sbasepath;
  10. Ofckeditor. replacetextarea ();
  11. }
  12. </SCRIPT>
  13. </Head>
  14. <Body>
  15. <Form action = "destination. jsp" method = "Post" target = "_ blank">
  16. <Div>
  17. <Textarea name = "fckeditor1" rows = "10" Cols = "80" style = "width: 100%; Height: 200px"> This textarea name is very important </textarea>
  18. </Div>
  19. <Br/>
  20. <Input type = "Submit" value = "Submit"/>
  21. </Form>
  22. </Body>
  23. </Html>

Note that:
(1) The function called by window. onload during file loading is sbasepath = "FCKeditor directory ";
(2) The parameter passed when the FCKeditor object is generated should be the name of the textarea you want to replace.
4.create a new fckeditordirectory under the webrootdirectory, copy the files to this directory, and then copy the code in sample.html to the desired location.

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.