@lexical/overflow
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -12,2 +12,3 @@ /** | ||
/** @module @lexical/overflow */ | ||
/** @noInheritDoc */ | ||
@@ -18,11 +19,15 @@ class OverflowNode extends lexical.ElementNode { | ||
} | ||
static clone(node) { | ||
return new OverflowNode(node.__key); | ||
} | ||
static importJSON(serializedNode) { | ||
return $createOverflowNode(); | ||
} | ||
static importDOM() { | ||
return null; | ||
} | ||
constructor(key) { | ||
@@ -32,19 +37,24 @@ super(key); | ||
} | ||
exportJSON() { | ||
return { | ||
...super.exportJSON(), | ||
return { ...super.exportJSON(), | ||
type: 'overflow' | ||
}; | ||
} | ||
createDOM(config) { | ||
const div = document.createElement('span'); | ||
const className = config.theme.characterLimit; | ||
if (typeof className === 'string') { | ||
div.className = className; | ||
} | ||
return div; | ||
} | ||
updateDOM(prevNode, dom) { | ||
return false; | ||
} | ||
insertNewAfter(selection, restoreSelection = true) { | ||
@@ -54,5 +64,7 @@ const parent = this.getParentOrThrow(); | ||
} | ||
excludeFromCopy() { | ||
return true; | ||
} | ||
} | ||
@@ -59,0 +71,0 @@ function $createOverflowNode() { |
@@ -11,6 +11,6 @@ { | ||
"license": "MIT", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"main": "LexicalOverflow.js", | ||
"peerDependencies": { | ||
"lexical": "0.8.1" | ||
"lexical": "0.9.0" | ||
}, | ||
@@ -17,0 +17,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6822
107