@docs.plus/extension-hyperlink 1.3.7 → 1.3.11

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/src/hyperlink.ts CHANGED
@@ -33,13 +33,13 @@ export interface HyperlinkOptions {
33
33
  */
34
34
  HTMLAttributes: Record<string, any>;
35
35
  /**
36
- * A list of modals to be rendered.
36
+ * A list of dialogBoxs to be rendered.
37
37
  * @default null
38
38
  * @example
39
39
  */
40
- modals: {
41
- previewHyperlink?: ((options: any) => HTMLElement) | null;
42
- setHyperlink?: ((options: any) => void) | null;
40
+ dialogBoxs: {
41
+ previewHyperlink?: ((options: any) => void | HTMLElement) | null;
42
+ setHyperlink?: ((options: any) => void | HTMLElement) | null;
43
43
  };
44
44
  /**
45
45
  * A validation function that modifies link verification for the auto linker.
@@ -116,7 +116,7 @@ export const Hyperlink = Mark.create<HyperlinkOptions>({
116
116
  rel: "noopener noreferrer nofollow",
117
117
  class: null,
118
118
  },
119
- modals: {
119
+ dialogBoxs: {
120
120
  previewHyperlink: null,
121
121
  setHyperlink: null,
122
122
  },
@@ -151,13 +151,13 @@ export const Hyperlink = Mark.create<HyperlinkOptions>({
151
151
  setHyperlink:
152
152
  (attributes) =>
153
153
  ({ editor, chain }) => {
154
- if (!this.options.modals.setHyperlink) {
154
+ if (!this.options.dialogBoxs.setHyperlink) {
155
155
  return chain()
156
156
  .setMark(this.name, attributes)
157
157
  .setMeta("preventAutohyperlink", true)
158
158
  .run();
159
159
  } else {
160
- this.options.modals.setHyperlink({
160
+ this.options.dialogBoxs.setHyperlink({
161
161
  editor,
162
162
  validate: this.options.validate,
163
163
  extentionName: this.name,
@@ -253,7 +253,7 @@ export const Hyperlink = Mark.create<HyperlinkOptions>({
253
253
  editor: this.editor,
254
254
  validate: this.options.validate,
255
255
  view: this.editor.view,
256
- modals: this.options.modals,
256
+ dialogBox: this.options.dialogBoxs.previewHyperlink,
257
257
  })
258
258
  );
259
259
  }
package/src/index.ts CHANGED
@@ -1,7 +1,17 @@
1
- import { Hyperlink } from "./hyperlink";
1
+ export * from "./hyperlink";
2
+
3
+ export * from "./helpers/tippyHelper";
4
+
5
+ export * from "./dialogBoxs/previewHyperlink";
6
+
7
+ export * from "./dialogBoxs/setHyperlink";
8
+
9
+ import { previewHyperlink } from "./dialogBoxs/previewHyperlink";
10
+
11
+ import { setHyperlink } from "./dialogBoxs/setHyperlink";
12
+
2
13
  import Tooltip from "./helpers/tippyHelper";
3
14
 
4
- export { Tooltip };
5
- export * from "./hyperlink";
15
+ import { Hyperlink } from "./hyperlink";
6
16
 
7
- export default Hyperlink;
17
+ export { Hyperlink, Tooltip, previewHyperlink, setHyperlink };