@lexical/hashtag
Advanced tools
Comparing version 0.12.2 to 0.12.3
@@ -19,4 +19,4 @@ /** | ||
*/ | ||
/** @noInheritDoc */ | ||
class HashtagNode extends lexical.TextNode { | ||
@@ -26,11 +26,8 @@ static getType() { | ||
} | ||
static clone(node) { | ||
return new HashtagNode(node.__text, node.__key); | ||
} | ||
constructor(text, key) { | ||
super(text, key); | ||
} | ||
createDOM(config) { | ||
@@ -41,3 +38,2 @@ const element = super.createDOM(config); | ||
} | ||
static importJSON(serializedNode) { | ||
@@ -51,18 +47,16 @@ const node = $createHashtagNode(serializedNode.text); | ||
} | ||
exportJSON() { | ||
return { ...super.exportJSON(), | ||
return { | ||
...super.exportJSON(), | ||
type: 'hashtag' | ||
}; | ||
} | ||
canInsertTextBefore() { | ||
return false; | ||
} | ||
isTextEntity() { | ||
return true; | ||
} | ||
} | ||
} | ||
/** | ||
@@ -73,6 +67,6 @@ * Generates a HashtagNode, which is a string following the format of a # followed by some text, eg. #lexical. | ||
*/ | ||
function $createHashtagNode(text = '') { | ||
return lexical.$applyNodeReplacement(new HashtagNode(text)); | ||
} | ||
/** | ||
@@ -83,3 +77,2 @@ * Determines if node is a HashtagNode. | ||
*/ | ||
function $isHashtagNode(node) { | ||
@@ -86,0 +79,0 @@ return node instanceof HashtagNode; |
@@ -11,9 +11,9 @@ { | ||
"license": "MIT", | ||
"version": "0.12.2", | ||
"version": "0.12.3", | ||
"main": "LexicalHashtag.js", | ||
"peerDependencies": { | ||
"lexical": "0.12.2" | ||
"lexical": "0.12.3" | ||
}, | ||
"dependencies": { | ||
"@lexical/utils": "0.12.2" | ||
"@lexical/utils": "0.12.3" | ||
}, | ||
@@ -20,0 +20,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
132
7608
+ Added@lexical/list@0.12.3(transitive)
+ Added@lexical/selection@0.12.3(transitive)
+ Added@lexical/table@0.12.3(transitive)
+ Added@lexical/utils@0.12.3(transitive)
+ Addedlexical@0.12.3(transitive)
- Removed@lexical/list@0.12.2(transitive)
- Removed@lexical/selection@0.12.2(transitive)
- Removed@lexical/table@0.12.2(transitive)
- Removed@lexical/utils@0.12.2(transitive)
- Removedlexical@0.12.2(transitive)
Updated@lexical/utils@0.12.3