From 03d1464e0fb2fe9bf349c1535649d6c0d7df2c04 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 28 Sep 2019 21:55:19 +0200 Subject: [PATCH] Update getContent in text component --- src/dom_components/view/ComponentTextView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 92905daa1..e4291e6cf 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -75,12 +75,15 @@ export default ComponentView.extend({ */ getContent() { const { rte } = this; + const { activeRte } = rte || {}; let content = ''; - if(rte.activeRte && typeof rte.activeRte.getContent === 'function') { - content = rte.activeRte.getContent(); + + if (activeRte && typeof activeRte.getContent === 'function') { + content = activeRte.getContent(); } else { content = this.getChildrenContainer().innerHTML; } + return content; },