Browse Source

Add getWrapper method in Editor

pull/1518/head
Artur Arseniev 8 years ago
parent
commit
3cd72d8987
  1. 12
      src/editor/index.js

12
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>|Object|string} components HTML string or components model

Loading…
Cancel
Save