@ekz/lexical-link 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ClickableLinkExtension.d.ts +22 -0
- package/EkzLexicalLink.dev.js +1190 -0
- package/EkzLexicalLink.dev.mjs +1172 -0
- package/EkzLexicalLink.js +11 -0
- package/EkzLexicalLink.mjs +28 -0
- package/EkzLexicalLink.node.mjs +26 -0
- package/EkzLexicalLink.prod.js +9 -0
- package/EkzLexicalLink.prod.mjs +9 -0
- package/LICENSE +21 -0
- package/LexicalAutoLinkExtension.d.ts +41 -0
- package/LexicalLink.js.flow +168 -0
- package/LexicalLinkExtension.d.ts +37 -0
- package/LexicalLinkNode.d.ts +126 -0
- package/README.md +7 -0
- package/index.d.ts +14 -0
- package/package.json +43 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { NamedSignalsOutput } from '@ekz/lexical-extension';
|
|
9
|
+
import { LexicalEditor } from '@ekz/lexical';
|
|
10
|
+
export interface ClickableLinkConfig {
|
|
11
|
+
/** Open clicked links in a new tab when true (default false) */
|
|
12
|
+
newTab: boolean;
|
|
13
|
+
/** Disable this extension when true (default false) */
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function registerClickableLink(editor: LexicalEditor, stores: NamedSignalsOutput<ClickableLinkConfig>, eventOptions?: Pick<AddEventListenerOptions, 'signal'>): () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Normally in a Lexical editor the `CLICK_COMMAND` on a LinkNode will cause the
|
|
19
|
+
* selection to change instead of opening a link. This extension can be used to
|
|
20
|
+
* restore the default behavior, e.g. when the editor is not editable.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ClickableLinkExtension: import("@ekz/lexical").LexicalExtension<ClickableLinkConfig, "@ekz/lexical-link/ClickableLink", NamedSignalsOutput<ClickableLinkConfig>, unknown>;
|