diff --git a/app/components/SimpleEditor/ContainerEditor.js b/app/components/SimpleEditor/ContainerEditor.js index 65ef7f40784d3a71534e360935e962632ca026f2..ae552f573c469ee70ef8b54c5f7d1ba0ae4b4504 100644 --- a/app/components/SimpleEditor/ContainerEditor.js +++ b/app/components/SimpleEditor/ContainerEditor.js @@ -35,7 +35,7 @@ class ContainerEditor extends SubstanceContainerEditor { didMount () { super.didMount() - if (this.isEmpty()) this.createText() + if (this.isEmpty() && this.props.containerId !== 'mini') this.createText() // TODO -- why this and not this.focus ? this.el.focus() @@ -193,13 +193,12 @@ class ContainerEditor extends SubstanceContainerEditor { }) container.show(node.id) - const containerId = this.getContainerId() newSel = tx.createSelection({ type: 'property', // TODO -- both id's ?? - containerId: containerId, - surfaceId: containerId, + containerId: this.props.containerId, + surfaceId: this.props.containerId, path: [ node.id, 'content' ], startOffset: 0, endOffset: 0 @@ -237,12 +236,6 @@ class ContainerEditor extends SubstanceContainerEditor { ) } - getContainerId () { - let containerId = this.props.containerId - if (typeof containerId === 'undefined') containerId = 'mini' - return containerId - } - getEditor () { return this.context.editor }