@mdxeditor/editor 3.21.0 → 3.21.1
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.
|
@@ -162,6 +162,7 @@ const linkDialogState$ = Cell({ type: "inactive" }, (r) => {
|
|
|
162
162
|
rectangle: getSelectionRectangle(activeEditor)
|
|
163
163
|
};
|
|
164
164
|
} else {
|
|
165
|
+
console.log("setting to inactive");
|
|
165
166
|
return { type: "inactive" };
|
|
166
167
|
}
|
|
167
168
|
} else {
|
|
@@ -190,30 +191,32 @@ const openLinkEditDialog$ = Action((r) => {
|
|
|
190
191
|
),
|
|
191
192
|
([, selection, editor]) => {
|
|
192
193
|
editor == null ? void 0 : editor.focus(() => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
194
|
+
setTimeout(() => {
|
|
195
|
+
editor.getEditorState().read(() => {
|
|
196
|
+
const node = getLinkNodeInSelection(selection);
|
|
197
|
+
const rectangle = getSelectionRectangle(editor);
|
|
198
|
+
if (node) {
|
|
199
|
+
r.pub(linkDialogState$, {
|
|
200
|
+
type: "edit",
|
|
201
|
+
initialUrl: node.getURL(),
|
|
202
|
+
initialTitle: node.getTitle() ?? "",
|
|
203
|
+
url: node.getURL(),
|
|
204
|
+
title: node.getTitle() ?? "",
|
|
205
|
+
linkNodeKey: node.getKey(),
|
|
206
|
+
rectangle
|
|
207
|
+
});
|
|
208
|
+
} else {
|
|
209
|
+
r.pub(linkDialogState$, {
|
|
210
|
+
type: "edit",
|
|
211
|
+
initialUrl: "",
|
|
212
|
+
initialTitle: "",
|
|
213
|
+
title: "",
|
|
214
|
+
url: "",
|
|
215
|
+
linkNodeKey: "",
|
|
216
|
+
rectangle
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
217
220
|
});
|
|
218
221
|
});
|
|
219
222
|
}
|