Page tree
Skip to end of metadata
Go to start of metadata

RELEASE 2.9.5 OR ABOVE

'If there is a specified URL pattern among the images included in the editor body, upload all images after downloading them.
When all downloaded images are uploaded, the designated callbackFunc is called.
By calling getPublishingHtml() in callbackFunc, you can get the HTML tag including the URLs of the changed images.
If there is no specified pattern, only callbackFunc is called and immediately returned.


Parameters:

Name

Type

Attribute

Description

callbackFunc

Function
Specify the callback function to be executed after uploading all images (optional).
urlPatternREGEXP

URL patterns of the images to be downloaded. If not specified, refer to the pattern set in the config file.


Example:

Promise 사용
editor.downloadAndUploadImages(undefined, urlPattern).then(function() {
    var html = editor.getPublishingHtml();
});


Callback 함수 사용
function callback() {
    var html = editor.getPublishingHtml();
}
editor.downloadAndUploadImages(callback, urlPattern);
  • No labels