Embed a rich text editor into a CMS so content creators can format articles with bold, italics, and images without writing HTML.
Read the formatted HTML from the editor using getContent and save it to a database when a user submits a form.
Add a formatted text input area to a web app by dropping in two script tags and calling the initialization function.
Retrieve plain text from the editor using getContentTxt to display a preview or word count without HTML tags.
Download the package from the official site and add two script tags, no npm or build step required.
UEditor is a browser-based rich text editor developed by Baidu's web frontend team. A rich text editor is the kind of text input area where you can apply bold, italics, insert images, and format content visually, similar to what you see in email clients or content management systems, rather than writing raw HTML or plain text. The editor is designed to be embedded in a web page with a few lines of JavaScript. Setup involves downloading the package from the official site, adding a script tag for the configuration file and one for the editor itself, and calling a single initialization function that targets a container element on the page. Once initialized, the editor appears in place of that container with a toolbar and editing area ready to use. Content can be read from or written to the editor programmatically using getContent and setContent methods, which return and accept HTML. A separate method, getContentTxt, returns the content as plain text with HTML tags stripped out. Most behavior, such as whether the editor auto-adjusts its height, can be controlled by passing a configuration object at initialization time or by editing the configuration file. The project is released under the MIT license, which allows free use and modification. The README is brief and written mainly in Chinese. It links to a separate documentation site with API references and more detailed guides. The project was created and maintained by Baidu's FEX team.
← fex-team on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.