Replace Wordpress with the ueditor editor.

Source: Internet
Author: User
Tags install wordpress


1. Download/install

Download and install wordpress, and download the Baidu editor wp plug-in.

2. Install Baidu editor

2.1 decompress the package and copy the ueditor folder to wp-content/plugins.

2. Copy the general-template.php file under the ueditor file to the wp-topics des/folder, copy the original file, or change the source file first.

2. 3. Modify general-template.php

About 1790th lines of the file

Function wp_editor ($ content, $ id = 'content ')
{
Echo '<textarea class = "wp-editor-area" rows = "20" tabindex = "1" cols = "40"
Name = "content" id = "content" style = "display: none;" aria-hidden = "true"> '. $ content.' </textarea> ';
Echo '<script type = "text/javascript" src = "../wp-content/plugins/ueditor/editor_config.js"> </script> ';
Echo '<script type = "text/javascript" src = "../wp-content/plugins/ueditor/editor-all.js"> </script> ';
Echo '<link rel = "stylesheet" type = "text/css" href = "../wp-content/plugins/ueditor/themes/default/ueditor.css"/> ';
Echo "<script type = 'text/javascript '>
Var editor = new baidu. editor. ui. Editor (
   {
InitialContent: document. getElementById ('content'). value,
Textarea: 'content'
});
Editor. render ('content ')
</Script> ";
}

2. 4. Modify wp-content/plugins/ueditor/editor_config.js

Change

Var URL = window. location. protocol + "//" + window. location. hostname + "/wp-content/plugins/ueditor /";
// You can configure the relative path of the ueditor directory on your website.

3. Modify

Modify wp-admin.css under wp-admin/
Search # wp-word-count
# Wp-word-count {display: none; padding: 2px 10px ;}< strong> </strong>/* The number of words is counted, because the Baidu editor already has this function, none is dropped, but it is dispensable! */

4. Note

Currently, the official version only supports Wordpress V3.2.1. There are still many bugs and deficiencies in the new version of Wordpress, which are not recommended for Wordpress 3.2.1 or later versions. Therefore, Baidu editor is only for testing.

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.