diff --git a/src/editor/index.js b/src/editor/index.js index a8293035d..085e94a4b 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -288,13 +288,21 @@ module.exports = config => { }, /** - * Returns components in JSON format object - * @return {Object} + * Return the complete tree of components. Use `getWrapper` to include also the wrapper + * @return {Components} */ getComponents() { return em.get('DomComponents').getComponents(); }, + /** + * Return the wrapper and its all components + * @return {Component} + */ + getWrapper() { + return em.get('DomComponents').getWrapper(); + }, + /** * Set components inside editor's canvas. This method overrides actual components * @param {Array|Object|string} components HTML string or components model