Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the php text document edit box

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "php text document edit box how to use", the text explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "php text document edit box how to use" it!

How to use it:

Because this plug-in is developed by Baidu's "FEX front-end R & D team", and there are strong and detailed Chinese documents officially, the purpose of this article is to let friends know that there is such a good plug-in, so documentation manuals, downloads and examples are all linked to the official.

Download the language version you want, then extract it, and create a html file called demo in the extracted directory, as follows

Ueditor demo

Write your initialization here.

Var ue=UE.getEditor ('container')

OK, complete the above work, open demo.html with a browser, if you see the following screen, then congratulations on your first successful deployment!

How to use it? Another detailed usage: create a demo.html file, first add the following code where you need to add an editor, and use style to set the width and height of the editor.

Content area

Then, load the UMeditor-related js and css files. Related documents can be downloaded from this site or directly to the UMeditor official website to download the latest version.

Next, we start to call the editor:

Var um=UM.getEditor ('myEditor')

Now we can open the browser to preview the editor effect.

Customization option

UMeditor provides a wealth of option settings that users can customize according to their own project needs.

You can use the following code to get the content in the editor, and you can also get the plain text content.

UM.getEditor ('myEditor'). GetContent ()

To determine whether the editor has content, you can use the following code:

Var cont=UM.getEditor ('myEditor'). HasContents ()

If (cont==true) {

Alert ('have content.' )

} else {

Alert ('No content.' )

}

If you put the editor into the form form and set the action path, you can submit the form and transfer the contents of the editor. Such as:

Submit

We can set the tool icons allowed in the toolbar, such as the following is a simple customization of several commonly used tool icons:

Var editor=UM.getEditor ('container', {

Toolbar:

['bold italic underline fullscreen',' link unlink',' | justifyleft justifycenter justifyright justifyjustify |', 'emotion image video | map']

})

UMeditor provides many tools that can be customized according to your needs, such as table editing, list layout, multimedia insertion, picture upload, map call, and so on. UMeditor provides several language versions of the server, mainly for uploading pictures. Users can set upload path, upload file type limit, size limit, and so on. You only need to set it up to apply it.

Thank you for your reading, the above is the "php text document edit box how to use" the content, after the study of this article, I believe you on the php text document edit box how to use this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report