Display tutorial video in editor
[MAILPOET-1447]
This commit is contained in:
@ -16,6 +16,12 @@ const renderBreadcrumb = (newsletterType) => {
|
|||||||
ReactDOM.render(breadcrumb, breadcrumbContainer);
|
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 initializeEditor = (config) => {
|
||||||
const editorContainer = document.getElementById('mailpoet_editor');
|
const editorContainer = document.getElementById('mailpoet_editor');
|
||||||
const getUrlParam = param => (location.search.split(`${param}=`)[1] || '').split('&')[0];
|
const getUrlParam = param => (location.search.split(`${param}=`)[1] || '').split('&')[0];
|
||||||
@ -33,6 +39,7 @@ const initializeEditor = (config) => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.always(() => MailPoet.Modal.loading(false))
|
.always(() => MailPoet.Modal.loading(false))
|
||||||
|
.always(() => displayTutorial())
|
||||||
.done((response) => {
|
.done((response) => {
|
||||||
const newsletter = response.data;
|
const newsletter = response.data;
|
||||||
|
|
||||||
|
@ -1295,6 +1295,7 @@
|
|||||||
"newsletter_editor/image-missing.svg"
|
"newsletter_editor/image-missing.svg"
|
||||||
) %>',
|
) %>',
|
||||||
},
|
},
|
||||||
|
dragDemoUrl: '<%= image_url("newsletter_editor/editor-drag-demo.mp4") %>',
|
||||||
};
|
};
|
||||||
wp.hooks.doAction('mailpoet_newsletters_editor_initialize', config);
|
wp.hooks.doAction('mailpoet_newsletters_editor_initialize', config);
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user