I also forced the dog, Baidu Editor organ document actually do very not detailed, are some basic usage, want to set an upload image default size can not find the corresponding document. In the elder brother's disdain diligently, finally is the disposition is good, actually is also very simple, adds a line of code ....
Find the editor root directory under the Ueditor.all.js, an open scare brother, tens of thousands of lines of code, but do not be afraid, search: Cllback () find this function
function callback () {try{var link, json, loader, bo DY = (Iframe.contentdocument | | iframe.contentWindow.document). Body, result = Body.innertext | | body.textcontent | | ''; JSON = (new Function ("return" + result)); link = me.options.imageUrlPrefix + json.url; if (json.state = = ' SUCCESS ' && json.url) {loader = Me.document.getElementById (loadingid ); Loader.setattribute (' src ', link); Loader.setattribute (' _src ', link); Loader.setattribute (' title ', Json.title | | | ''); Loader.setattribute (' Alt ', json.original | | ''); Loader.setattribute (' style ', ' max-width:650px ');//This is the code loader.removeattribute (' ID ') that the elder brother joins; DoMutils.removeclasses (loader, ' loadingclass '); }
Look at the comments section, in fact, to the IMG upload image price attributes on the line! You can arbitrarily add attributes, so willful, is so casual, passed by, learned to give Gozin a!!
The above describes the Baidu Ueditor upload images when the default width, including the content, I hope that the PHP tutorial interested friends have helped.