Ueditor uparse function Bug, generate global css:li, affect global style, cause the other parts of the webpage display chaotic solution

Source: Internet
Author: User


ueditor uparse features about CSS Li Bugs, Workarounds


Baidu Ueditor is a good online Rich text editor plug-in, here do not do too much introduction, details Ueditor official website: http://ueditor.baidu.com/


Bug:ueditor uparse function, generated a global css:li, affecting the global style, causing the other parts of the page to show confusion.

Version: Ueditor 1.4.3


The analysis is as follows:

Ueditor uparse function Bug, generated a global css:li, affecting the global style, causing the other parts of the page to display confusion, as shown:



Here's how to fix it:

Find the source code for the CSS generated by uparse, and then modify the Li style to the local style of the selector. Directly modify the Ueditor.parse.js or ueditor.parse.min.js the following way:
1, ueditor.parse.js file: Find "Li{clear:both;} ", replaced by" ' +selector + ' li{clear:both;} ";
2. ueditor.parse.min.js file: Also find "li{clear:both;} ", and then replace with" +c+ "Li{clear:both;} To



Issue submitted Ueditor github:https://github.com/fex-team/ueditor/issues/2164





Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ueditor uparse function Bug, generate global css:li, affect global style, cause the other parts of the webpage display chaotic solution

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.