Display tutorial video in editor

[MAILPOET-1447]
This commit is contained in:
Pavel Dohnal
2018-08-14 12:52:48 +02:00
parent 4a810f9103
commit 9efb5b5f90
2 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,12 @@ const renderBreadcrumb = (newsletterType) => {
ReactDOM.render(breadcrumb, breadcrumbContainer);
};
function displayTutorial() {
MailPoet.Modal.popup({
template: '<video style="height:640px;" src=' + window.config.dragDemoUrl + ' controls autoplay></video>',
});
}
const initializeEditor = (config) => {
const editorContainer = document.getElementById('mailpoet_editor');
const getUrlParam = param => (location.search.split(`${param}=`)[1] || '').split('&')[0];
@ -33,6 +39,7 @@ const initializeEditor = (config) => {
},
})
.always(() => MailPoet.Modal.loading(false))
.always(() => displayTutorial())
.done((response) => {
const newsletter = response.data;