Browse Source

Fix block manager rendering with custom appendTo

pull/3905/head
Artur Arseniev 5 years ago
parent
commit
e79bb386c7
  1. 6
      src/commands/view/OpenBlocks.js

6
src/commands/view/OpenBlocks.js

@ -4,13 +4,13 @@ import { createEl } from '../../utils/dom';
export default {
open() {
const { container, editor, bm, config } = this;
const { custom } = config;
const { custom, appendTo } = config;
if (isFunction(custom.open)) {
return custom.open(bm.__customData());
}
if (this.firstRender) {
if (this.firstRender && !appendTo) {
const id = 'views-container';
const pn = editor.Panels;
const panels = pn.getPanel(id) || pn.addPanel({ id });
@ -32,7 +32,7 @@ export default {
if (container) container.style.display = 'none';
},
run(editor, sender) {
run(editor) {
const bm = editor.Blocks;
this.config = bm.getConfig();
this.firstRender = !this.container;

Loading…
Cancel
Save