Baidu editor Ueditor foreground code highlight unable to wrap line resolution _ Web page Editor

Source: Internet
Author: User

Problem Description:

Inserted in the content of the code highlighted, the background editor can be automatically wrapped, but published, in the foreground view, found that the code can not automatically wrap, directly beyond the boundaries of the content page, very beautiful, although the copy can be complete.

Solution:

Find the CSS file for the highlighted code display/E/DATA/ECMSEDITOR/UEDITOR/THIRD-PARTY/SYNTAXHIGHLIGHTER/SHCOREDEFAULT.CSS

The specific path changes according to your ueditor.

Found it

Copy Code code as follows:

. syntaxhighlighter{width:100%!important;margin:.3em 0 3em 0!important;position:relative!important;overflow:auto! Important;background-color: #f5f5f5!important;border:1px solid #ccc!important;

Change into

Copy Code code as follows:

. syntaxhighlighter{width:100%!important;margin:.3em 0 3em 0!important;position:relative!important;overflow:auto! Important;background-color: #f5f5f5!important;border:1px solid #ccc!important;word-break:break-all;

is to add word-break:break-all;

Maybe different ueditor versions of CSS are not the same, as long as the corresponding position plus this force-wrapping is OK

Final effect

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.