Detached method and method of use of online HTML editors

xiaoxiao2021-03-06  64

HTML Online Editor does not need to know how to use Dreamweaver, use Word to use this editor, which is very practical in the article system or news system requires text editing web programs.

But how do you embed the HTML editor into the web page and how to get the data inside? !

First we assume that we have to call the HTML online editor in a separate page, the file name is gledit.htm.

HTML online editor has two basic call methods

First, use Object calls:

1. How to embed an HTML editor in a web page: We add the following HTML code in need to embed position:

The Object Tags have received data later that the data we have to call the online editor page, the ID is to call Object to get the ID, and then use this ID when you get the data in the editor. Width and Height are the height and width of the editor.

2, how to get the data in the HTML editor: All the content you need to submit We all put it in a form, and use the Object called editor in this form, and we can set a hidden text area (< Textarea name = "content" style = "display: none"> or ) to temporarily save the data of the HTML online editor when submitted, because ASP or JSP, the content of Object in the form cannot be directly acquired in PHP, so we must obtain data with hidden text area. We copy the contents of the Object to the hidden text area while submitting. The detailed code is as follows: