@manuscripts/body-editor 1.6.0 → 1.6.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/dist/cjs/useEditor.js
CHANGED
|
@@ -68,9 +68,7 @@ const useEditor = (initialState, createView) => {
|
|
|
68
68
|
state.doc.descendants((node, pos) => {
|
|
69
69
|
if (node.attrs.id === id) {
|
|
70
70
|
currentView.focus();
|
|
71
|
-
const selection =
|
|
72
|
-
? prosemirror_state_1.NodeSelection.create(state.tr.doc, pos)
|
|
73
|
-
: prosemirror_state_1.TextSelection.near(state.tr.doc.resolve(pos + 1));
|
|
71
|
+
const selection = prosemirror_state_1.NodeSelection.create(state.tr.doc, pos);
|
|
74
72
|
currentView.dispatch(state.tr.setSelection(selection));
|
|
75
73
|
const dom = currentView.domAtPos(pos + 1);
|
|
76
74
|
if (dom.node instanceof Element) {
|
package/dist/es/useEditor.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { NodeSelection,
|
|
16
|
+
import { NodeSelection, } from 'prosemirror-state';
|
|
17
17
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
18
18
|
import { useHistory } from 'react-router-dom';
|
|
19
19
|
import { bibliographyKey } from './plugins/bibliography';
|
|
@@ -66,9 +66,7 @@ const useEditor = (initialState, createView) => {
|
|
|
66
66
|
state.doc.descendants((node, pos) => {
|
|
67
67
|
if (node.attrs.id === id) {
|
|
68
68
|
currentView.focus();
|
|
69
|
-
const selection =
|
|
70
|
-
? NodeSelection.create(state.tr.doc, pos)
|
|
71
|
-
: TextSelection.near(state.tr.doc.resolve(pos + 1));
|
|
69
|
+
const selection = NodeSelection.create(state.tr.doc, pos);
|
|
72
70
|
currentView.dispatch(state.tr.setSelection(selection));
|
|
73
71
|
const dom = currentView.domAtPos(pos + 1);
|
|
74
72
|
if (dom.node instanceof Element) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.2",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -549,10 +549,13 @@ Next levels are shifted 'up' by 1
|
|
|
549
549
|
margin: 0 0 36px;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
-
.keywords h1 {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
552
|
+
.ProseMirror > .keywords > .block-section_title > h1 {
|
|
553
|
+
color: #353535 !important;
|
|
554
|
+
font-size: 12px !important;
|
|
555
|
+
font-style: italic !important;
|
|
556
|
+
font-weight: 400 !important;
|
|
557
|
+
line-height: 16px !important;
|
|
558
|
+
margin-top: 4px !important;
|
|
556
559
|
}
|
|
557
560
|
|
|
558
561
|
.keywords-list {
|