My directory structure is: www/cms/myeditor/
The address of the upload image is: www/images/news/content/
Modify Editor_config.js:
*/
Window. Ueditor_home_url = "/cms/myeditor/";
var URL;
var tmp = Window.location.pathname;
URL = window. ueditor_home_url| | Tmp.substr (0,tmp.lastindexof ("/") +1). Replace ("_examples/", ""). Replace ("website/", ""); Here you can configure the Ueditor directory to the relative path or absolute path of your site (meaning an absolute path beginning with HTTP)
Window. Ueditor_config = {
Adds a path to the editor instance, which cannot be commented
Ueditor_home_url:url
Picture Upload Configuration Area
, imageurl:url+ "app/imageup.ashx"//Photo Upload submit Address
, ImagePath: "..." The picture corrects the address, has quoted the Fixedimagepath, if has the special request, may configure itself
, Imagefieldname: "Upfile"//Picture Data key, if modified here, need to modify the corresponding parameter in the background corresponding file
, compressside:0///etc ratio compression datum, determine the Reference object of Maximagesidelength parameter. 0 is according to the longest edge, 1 is according to width, 2 is according to the height
, maximagesidelength:1900//upload picture maximum allowable side length, exceeding will automatically wait for scaling, do not scale to set a relatively large value, more set in image.html
(The part of the Scarlet Letter is modified)
Then modify the upload path in the Imageup.ashx file:
String pathbase = "/images/news/content/"; Save path
In this way, other uses refer to the official document on the line. If the picture is not uploaded properly under the Chorme browser, please check the editor_config.js file, ImagePath: "..." The parameter is set correctly. If the upload is correct, but in the rich text box to show the Red Fork is also the path is wrong, the mouse to move to the image does not show the success of the suspension menu will appear, click "Modify/Edit", in the Picture Properties window you can see the path of the picture, you can find out where the wrong.
The above modified file save directory is the ASP.net file, the following for PHP users to introduce
1, put the Ueditor folder in the root directory, the picture is to be placed in the site root directory under the Uploads/ueditor folder.
2, open the ueditor/php directory: fileup.php, getremoteimage.php, imagemanager.php, imageup.php, scrawup.php files.
3, change the fileup.php file of the $config array of savepath parameters, about 12 lines around.
4, change the getremoteimage.php file of the $config array of savepath parameters, about 12 lines around.
5, change the imagemanager.php file $paths variable value, about 13 lines around.
Jquery1102011631630689589156= "/>"
6, change the imageup.php file $config[' savepath '] parameters, about 49 lines around.
7, change the scrawup.php file $config[' savepath '] parameters, about 7 lines around.
After a good refresh of the page, upload pictures or files to try to see Uploads/ueditor directory there is no file or folder bar ^_^.