@seafile/sdoc-editor 0.1.164 → 0.1.165
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.
|
@@ -32,13 +32,10 @@
|
|
|
32
32
|
|
|
33
33
|
/* reset common css */
|
|
34
34
|
.sdoc-editor-page-wrapper .dropdown-item,
|
|
35
|
-
.sdoc-comment-list-menu .dropdown-item,
|
|
36
35
|
.sdoc-context-menu .dropdown-item {
|
|
37
36
|
color: #212529;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
.sdoc-editor-page-wrapper .dropdown-item:hover,
|
|
41
|
-
.sdoc-comment-list-menu .dropdown-item:hover,
|
|
42
39
|
.sdoc-context-menu .dropdown-item:hover {
|
|
43
40
|
color: #fff;
|
|
44
41
|
}
|
|
@@ -179,6 +179,11 @@
|
|
|
179
179
|
word-break: break-all;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
.sdoc-comment-list-container .comment-editor-wrapper .comment-editor:empty:before {
|
|
183
|
+
content: attr(placeholder);
|
|
184
|
+
opacity: .6;
|
|
185
|
+
}
|
|
186
|
+
|
|
182
187
|
.sdoc-comment-list-container .comment-editor-wrapper .comment-editor:focus-visible {
|
|
183
188
|
outline: none;
|
|
184
189
|
}
|
|
@@ -71,10 +71,6 @@ export var insertLink = function insertLink(editor, title, url) {
|
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
var p = generateEmptyElement(ELEMENT_TYPE.PARAGRAPH);
|
|
74
|
-
p.children[0] = {
|
|
75
|
-
id: slugid.nice(),
|
|
76
|
-
text: ' '
|
|
77
|
-
};
|
|
78
74
|
p.children[1] = linkNode;
|
|
79
75
|
p.children[2] = {
|
|
80
76
|
id: slugid.nice(),
|
|
@@ -91,8 +87,6 @@ export var insertLink = function insertLink(editor, title, url) {
|
|
|
91
87
|
if (selection == null) return;
|
|
92
88
|
var isCollapsed = Range.isCollapsed(selection);
|
|
93
89
|
if (isCollapsed) {
|
|
94
|
-
// Insert Spaces before and after links for easy operation
|
|
95
|
-
editor.insertText(' ');
|
|
96
90
|
var _linkNode = genLinkNode(url, title);
|
|
97
91
|
Transforms.insertNodes(editor, _linkNode);
|
|
98
92
|
|
|
@@ -93,9 +93,8 @@ export var insertElement = function insertElement(editor, type, insertPosition)
|
|
|
93
93
|
});
|
|
94
94
|
Transforms.select(editor, [path[0] + 1]);
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
96
|
+
// Insertion position is current or after
|
|
97
|
+
Transforms.setNodes(editor, {
|
|
98
|
+
type: type
|
|
99
|
+
});
|
|
101
100
|
};
|