1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Lexical: Added direction support to extra blocks

Also removed duplicated dir functionality that remained in core.
This commit is contained in:
Dan Brown
2024-09-22 12:07:24 +01:00
parent e6edd9340e
commit 2add15bd72
6 changed files with 40 additions and 28 deletions

View File

@ -158,11 +158,6 @@ export class QuoteNode extends ElementNode {
const formatType = this.getFormatType();
element.style.textAlign = formatType;
const direction = this.getDirection();
if (direction) {
element.dir = direction;
}
}
return {
@ -174,7 +169,6 @@ export class QuoteNode extends ElementNode {
const node = $createQuoteNode();
node.setFormat(serializedNode.format);
node.setIndent(serializedNode.indent);
node.setDirection(serializedNode.direction);
return node;
}
@ -324,11 +318,6 @@ export class HeadingNode extends ElementNode {
const formatType = this.getFormatType();
element.style.textAlign = formatType;
const direction = this.getDirection();
if (direction) {
element.dir = direction;
}
}
return {
@ -340,7 +329,6 @@ export class HeadingNode extends ElementNode {
const node = $createHeadingNode(serializedNode.tag);
node.setFormat(serializedNode.format);
node.setIndent(serializedNode.indent);
node.setDirection(serializedNode.direction);
return node;
}