Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Dec 16, 2024
2 parents 5ecf938 + bf44530 commit ce94641
Show file tree
Hide file tree
Showing 115 changed files with 4,467 additions and 1,468 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ on:
- 'packages/lexical-website/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'examples/**'
- 'packages/lexical-website/**'
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
3 changes: 2 additions & 1 deletion examples/react-rich/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
DOMConversionMap,
DOMExportOutput,
DOMExportOutputMap,
isHTMLElement,
Klass,
LexicalEditor,
LexicalNode,
Expand All @@ -36,7 +37,7 @@ const removeStylesExportDOM = (
target: LexicalNode,
): DOMExportOutput => {
const output = target.exportDOM(editor);
if (output && output.element instanceof HTMLElement) {
if (output && isHTMLElement(output.element)) {
// Remove all inline styles and classes if the element is an HTMLElement
// Children are checked as well since TextNode can be nested
// in i, b, and strong tags.
Expand Down
30 changes: 27 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions packages/lexical-code/flow/LexicalCode.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ declare export class CodeHighlightNode extends TextNode {
// $FlowFixMe
static clone(node: CodeHighlightNode): CodeHighlightNode;
createDOM(config: EditorConfig): HTMLElement;
updateDOM(
// $FlowFixMe
prevNode: CodeHighlightNode,
dom: HTMLElement,
config: EditorConfig,
): boolean;
setFormat(format: number): this;
}

Expand Down Expand Up @@ -125,7 +119,6 @@ declare export class CodeNode extends ElementNode {
static clone(node: CodeNode): CodeNode;
constructor(language: ?string, key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
updateDOM(prevNode: CodeNode, dom: HTMLElement): boolean;
insertNewAfter(
selection: RangeSelection,
restoreSelection?: boolean,
Expand Down
6 changes: 1 addition & 5 deletions packages/lexical-code/src/CodeHighlightNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ export class CodeHighlightNode extends TextNode {
return element;
}

updateDOM(
prevNode: CodeHighlightNode,
dom: HTMLElement,
config: EditorConfig,
): boolean {
updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean {
const update = super.updateDOM(prevNode, dom, config);
const prevClassName = getHighlightThemeClass(
config.theme,
Expand Down
6 changes: 1 addition & 5 deletions packages/lexical-code/src/CodeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ export class CodeNode extends ElementNode {
}
return element;
}
updateDOM(
prevNode: CodeNode,
dom: HTMLElement,
config: EditorConfig,
): boolean {
updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean {
const language = this.__language;
const prevLanguage = prevNode.__language;

Expand Down
5 changes: 0 additions & 5 deletions packages/lexical-link/flow/LexicalLink.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ declare export class LinkNode extends ElementNode {
static clone(node: LinkNode): LinkNode;
constructor(url: string, attributes?: LinkAttributes, key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
updateDOM(
prevNode: LinkNode,
dom: HTMLElement,
config: EditorConfig,
): boolean;
static importDOM(): DOMConversionMap | null;
exportJSON(): SerializedLinkNode;
getURL(): string;
Expand Down
Loading

0 comments on commit ce94641

Please sign in to comment.