Baidu Ueditor component upload picture after how to set the ALT properties in IMG _ Page Editor

Source: Internet
Author: User
Tags json

Baidu Ueditor component, use upload picture, automatically upload picture to display in editor, that is to insert a tag. and set an Alt property whose value is the local path when uploading the picture. For the time being, I don't see where I can configure this value. When viewing the contents of a publication, it is a bit awkward to see the ALT value as a disk path.

You can edit the content, save to the database filter, modify ALT content, can also directly modify the source code

function callback () {
try{
var link, json, loader, body
= (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.removeattribute (' id ');
Domutils.removeclasses (loader, ' loadingclass ');
} else {
Showerrorloader && showerrorloader (json.state);
}
} catch (er) {
showerrorloader && showerrorloader (Me.getlang (' simpleupload.loaderror '));
Form.reset ();
domutils.un (IFRAME, ' Load ', callback);
}

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.