Skip to content
Snippets Groups Projects
Commit 79d790aa authored by chris's avatar chris Committed by john
Browse files

if containerId equals mini editor don't create an empty paragraph

parent 98b8aa9f
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment