@truedat/core 8.4.9 → 8.5.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"description": "Truedat Web Core",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@testing-library/jest-dom": "^6.6.3",
|
|
55
55
|
"@testing-library/react": "^16.3.0",
|
|
56
56
|
"@testing-library/user-event": "^14.6.1",
|
|
57
|
-
"@truedat/test": "8.
|
|
57
|
+
"@truedat/test": "8.5.2",
|
|
58
58
|
"identity-obj-proxy": "^3.0.0",
|
|
59
59
|
"jest": "^29.7.0",
|
|
60
60
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"@tiptap/core": "^3.20.0",
|
|
65
65
|
"@tiptap/extension-heading": "^3.20.0",
|
|
66
66
|
"@tiptap/extension-link": "^3.20.0",
|
|
67
|
+
"@tiptap/extension-underline": "^3.22.4",
|
|
67
68
|
"@tiptap/pm": "^3.20.0",
|
|
68
69
|
"@tiptap/react": "^3.20.0",
|
|
69
70
|
"@tiptap/starter-kit": "^3.20.0",
|
|
@@ -100,5 +101,5 @@
|
|
|
100
101
|
"swr": "^2.3.3",
|
|
101
102
|
"turndown": "^7.2.2"
|
|
102
103
|
},
|
|
103
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "d0bbace3698b98e458856143676b7f631ee8e18f"
|
|
104
105
|
}
|
|
@@ -5,6 +5,7 @@ import { useEditor, EditorContent } from "@tiptap/react";
|
|
|
5
5
|
import StarterKit from "@tiptap/starter-kit";
|
|
6
6
|
import Link from "@tiptap/extension-link";
|
|
7
7
|
import Heading from "@tiptap/extension-heading";
|
|
8
|
+
import Underline from "@tiptap/extension-underline";
|
|
8
9
|
import { Menu, Icon } from "semantic-ui-react";
|
|
9
10
|
import { FormattedMessage } from "react-intl";
|
|
10
11
|
import { marked } from "marked";
|
|
@@ -13,6 +14,10 @@ import TurndownService from "turndown";
|
|
|
13
14
|
import TextPromptModal from "./TextPromptModal";
|
|
14
15
|
|
|
15
16
|
const turndownService = new TurndownService({ headingStyle: "atx" });
|
|
17
|
+
turndownService.addRule("underline", {
|
|
18
|
+
filter: ["u"],
|
|
19
|
+
replacement: (content) => `<u>${content}</u>`,
|
|
20
|
+
});
|
|
16
21
|
const HEADING_LEVELS = [2, 3];
|
|
17
22
|
const extensions = [
|
|
18
23
|
StarterKit.configure({
|
|
@@ -29,6 +34,7 @@ const extensions = [
|
|
|
29
34
|
target: "_blank",
|
|
30
35
|
},
|
|
31
36
|
}),
|
|
37
|
+
Underline,
|
|
32
38
|
];
|
|
33
39
|
|
|
34
40
|
const validateUrl = (value, allowEmpty = false) => {
|
|
@@ -296,6 +302,15 @@ export function MarkdownEditor({
|
|
|
296
302
|
>
|
|
297
303
|
<Icon name="italic" />
|
|
298
304
|
</Menu.Item>
|
|
305
|
+
<Menu.Item
|
|
306
|
+
active={editor.isActive("underline")}
|
|
307
|
+
onMouseDown={(e) => {
|
|
308
|
+
e.preventDefault();
|
|
309
|
+
editor.chain().focus().toggleUnderline().run();
|
|
310
|
+
}}
|
|
311
|
+
>
|
|
312
|
+
<Icon name="underline" />
|
|
313
|
+
</Menu.Item>
|
|
299
314
|
<Menu.Item
|
|
300
315
|
onMouseDown={(e) => {
|
|
301
316
|
e.preventDefault();
|
|
@@ -24,6 +24,14 @@ exports[`<MarkdownEditor /> matches the latest snapshot when editor is ready 1`]
|
|
|
24
24
|
class="italic icon"
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
|
+
<div
|
|
28
|
+
class="item"
|
|
29
|
+
>
|
|
30
|
+
<i
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
class="underline icon"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
27
35
|
<div
|
|
28
36
|
class="item"
|
|
29
37
|
>
|
|
@@ -121,6 +129,14 @@ exports[`<MarkdownEditor /> matches the latest snapshot with label and value 1`]
|
|
|
121
129
|
class="italic icon"
|
|
122
130
|
/>
|
|
123
131
|
</div>
|
|
132
|
+
<div
|
|
133
|
+
class="item"
|
|
134
|
+
>
|
|
135
|
+
<i
|
|
136
|
+
aria-hidden="true"
|
|
137
|
+
class="underline icon"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
124
140
|
<div
|
|
125
141
|
class="item"
|
|
126
142
|
>
|