The custom style class name after the Ueditor uploads the image. The ueditor uploads the image
Ueditor is a rich text plug-in of Baidu. if the user has a front-end language, it applies well, especially in mobile terminals. However, users often do not understand programming and it is impossible for them to use the front-end language. This requires us to define the entire style during development.
Under normal circumstances, the uploaded image is fixed with a high width. To apply the image to a mobile terminal, we must define the width as 100% or add a class. This is our idea.
The following is the modification code:
Ueditor. all. jsUE. plugin. register ('simpleupload', function (){... function initUploadBtn (){... domUtils. on (btnIframe, 'load', function (){... domUtils. on (input, 'change', function()..me.exe cCommand ('insertml', ' '); // you can add custom styles here. If you have tried this operation, ueditor will be reported. all. js: #24461 line me.exe cCommand ('insertml', ' '); function callback (){... domUtils. setStyle (loader, 'width', '000000'); // you can specify the style of the widget. # 100%... domUtils. addClass (loader, 'custom Style Class name'); // It is a built-in method, #24534 ...}...})...})...}...}) when setting the style, you must modify usditor at the same time. config. js (function (){... window. UEDITOR_CONFIG = {... // xss filter whitelist Source: bytes :{... img: ['src', 'alt', 'title', 'width', 'height', 'id', '_ src', 'loadingclass', 'class ', 'Data-latex ', 'style'], // Add a filter whitelist style #403 ...}...}...})