fix floating menu example
This commit is contained in:
@@ -255,9 +255,8 @@ export default class Editor {
|
|||||||
|
|
||||||
registerPlugin(plugin = null) {
|
registerPlugin(plugin = null) {
|
||||||
if (plugin) {
|
if (plugin) {
|
||||||
this.plugins = this.plugins.concat([plugin])
|
|
||||||
this.state = this.state.reconfigure({
|
this.state = this.state.reconfigure({
|
||||||
plugins: this.plugins,
|
plugins: this.state.plugins.concat([plugin]),
|
||||||
})
|
})
|
||||||
this.view.updateState(this.state)
|
this.view.updateState(this.state)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Toolbar {
|
|||||||
|
|
||||||
const isActive = currentDom.node.innerHTML === '<br>'
|
const isActive = currentDom.node.innerHTML === '<br>'
|
||||||
&& currentDom.node.tagName === 'P'
|
&& currentDom.node.tagName === 'P'
|
||||||
// && currentDom.node.parentNode === view.dom
|
&& currentDom.node.parentNode === view.dom
|
||||||
|
|
||||||
if (!isActive) {
|
if (!isActive) {
|
||||||
this.hide()
|
this.hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user