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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

릴리즈 2.9.5 이상

에디터 본문에 포함된 이미지중 지정된 URL 패턴이 있을 경우 해당 이미지를 모두 다운로드 후 업로드합니다.
다운로드 받은 이미지들의 업로드가 모두 완료되면 지정된 callbackFunc을 호출합니다.
callbackFunc에서 getPublishingHtml()을 호출하면 변경된 이미지 URL을 포함한 HTML tag를 얻을 수 있습니다.
지정된 패턴이 없을 경우 callbackFunc만 호출하고 바로 return 합니다.


Parameters:

Name

Type

Attribute

Description

callbackFunc

Function
모든 이미지 업로드 후 실행할 callback 함수를 지정합니다. (optional)
urlPatternREGEXP

다운로드 받을 이미지의 URL 패턴. 지정하지 않으면 config파일에 설정된 패턴을 참고합니다. 


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