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