mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-23 23:02:08 +03:00
Lexical: Started code block node implementation
This commit is contained in:
@@ -160,11 +160,15 @@ export class EditorUIManager {
|
||||
const keys = Object.keys(decorators);
|
||||
for (const key of keys) {
|
||||
const decoratedEl = editor.getElementByKey(key);
|
||||
if (!decoratedEl) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const adapter = decorators[key];
|
||||
const decorator = this.getDecorator(adapter.type, key);
|
||||
decorator.setNode(adapter.getNode());
|
||||
const decoratorEl = decorator.render(this.getContext());
|
||||
if (decoratedEl) {
|
||||
const decoratorEl = decorator.render(this.getContext(), decoratedEl);
|
||||
if (decoratorEl) {
|
||||
decoratedEl.append(decoratorEl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user