대화 상자 없이 Avairy 실행(div 내부) (Launch Avairy without a dialog (inside div))


문제 설명

대화 상자 없이 Avairy 실행(div 내부) (Launch Avairy without a dialog (inside div))

내 사용자 정의 대화 상자 내에서 Avairy(Adobe Creative SDK, 웹 버전)를 사용해야 합니다.

대화 상자 대신 Avairy의 div를 가져올 수 있는 방법이 있습니까? 내 자신의 대화 상자 안에 배치하겠습니다.

주요 문제는 avairyEditor.launch() 메서드가 대화 상자를 열고 다른 작업을 수행할 수 있는 간단한 방법이 없다는 것입니다.

은 내 자신의 핵을 작성하는 유일한 방법(대화 상자를 표시하고 div를 자르지 않음)을 작성하거나 피를 거의 흘리지 않도록 할 수 있습니까?


참조 솔루션

방법 1:

Yes, you need to use the appendTo option in the configuration.

Your HTML:

<!‑‑ Aviary div container. You can use absolute/relative positioning ‑‑>
<div id='aviary' style='width:600px;height:400px;'></div>

<!‑‑ Add an edit button, passing the HTML id of the image
    and the public URL to the image ‑‑>
<a href="#" onclick="return launchEditor('editableimage1', 
    'http://example.com/public/images/goat.jpg');">Edit!</a>

<!‑‑ original line of HTML here: ‑‑>
<img id="editableimage1" src="http://example.com/public/images/goat.jpg"/>

Your JavaScript:

var featherEditor = new Aviary.Feather({
    apiKey: '1234567',
    appendTo: 'aviary'
    onSave: function(imageID, newURL) {
        var img = document.getElementById(imageID);
        img.src = newURL;
    }
});

function launchEditor(id, src) {
    featherEditor.launch({
        image: id,
        url: src
    });
    return false;
}

Documentation:

https://creativesdk.adobe.com/docs/web/#/articles/gettingstarted/index.html#constructor‑config‑appendTo

방법 2:

To get closer to what you are trying to do, consider using the appendTo property, as mentioned by Juangui, in addition to the following properties:

theme: 'minimum',
noCloseButton: 'true'

After that you can add some custom styling to better match the rest of your app.

(by Komi DumityJuangui JordánAsh Ryan Arnwine)

참조 문서

  1. Launch Avairy without a dialog (inside div) (CC BY‑SA 2.5/3.0/4.0)

#adobecreativesdk #html #Web #javascript






관련 질문

Swift의 Adobe Creative SDK (Adobe Creative SDK in Swift)

대화 상자 없이 Avairy 실행(div 내부) (Launch Avairy without a dialog (inside div))

Aviary/Creative SDK 이미지 편집기로 이미지 교체 (Replace image with Aviary/Creative SDK Image Editor)

Ionic/Cordova에서 Adobe Creative SDK Feather Editor를 통합하는 방법 (How to integrate Adobe Creative SDK Feather Editor in Ionic/Cordova)

64비트 Android 장치에서 .so 파일을 찾을 수 없습니다. (Can not find .so file on 64 bit android device)

편집된 이미지를 웹에 저장하기 위한 Adobe Creative SDK (Adobe Creative SDK for Web saving edited image)

크리에이티브 SDK. MainActivity를 실행한 다음 이미지 편집기를 시작합니다. 그런 다음 홈 키. 그런 다음 앱으로 돌아갑니다. 이미지 편집기 활동이 사라짐 (Creative SDK. MainActivity then launch Image Editor. then home key. then back to app. Image Editor activity disappear)

Creative SDK에 맞춤 프레임 및 스티커 추가 (Adding Custom Frames and Stickers to Creative SDK)

Aviary 웹 SDK 자르기 도구 및 모바일 브라우저 기능이 작동하지 않음 (Aviary web SDK crop tool and mobile browser features not working)

Aviary Image Editor에서 사용자 로그인 버튼 제거 (Removing user login button on Aviary Image Editor)

자르기 도구를 연 상태에서 강제 자르기/시작 (Force crop/start with crop tool open)

Adobe 크리에이티브 SDK가 Android Nougat에서 작동하지 않음 (Adobe creative SDK not working for Android Nougat)







코멘트