@manuscripts/body-editor 3.4.7 → 3.4.8
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/versions.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.FigureElementView = void 0;
|
|
19
19
|
const transform_1 = require("@manuscripts/transform");
|
|
20
|
+
const prosemirror_state_1 = require("prosemirror-state");
|
|
20
21
|
const icons_1 = require("../icons");
|
|
21
22
|
const creators_1 = require("./creators");
|
|
22
23
|
const image_element_1 = require("./image_element");
|
|
@@ -46,7 +47,8 @@ class FigureElementView extends image_element_1.ImageElementView {
|
|
|
46
47
|
const finalInsertPos = hasFigures ? lastFigureEndPos : figureElementPos + 1;
|
|
47
48
|
const figureNode = state.schema.nodes.figure.create();
|
|
48
49
|
tr.insert(finalInsertPos, figureNode);
|
|
49
|
-
|
|
50
|
+
tr.setSelection(prosemirror_state_1.TextSelection.create(tr.doc, finalInsertPos + 1));
|
|
51
|
+
this.view.dispatch(tr.scrollIntoView());
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
initialise() {
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.4.
|
|
1
|
+
export const VERSION = '3.4.8';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { schema } from '@manuscripts/transform';
|
|
17
|
+
import { TextSelection } from 'prosemirror-state';
|
|
17
18
|
import { addBtnIcon } from '../icons';
|
|
18
19
|
import { createNodeView } from './creators';
|
|
19
20
|
import { ImageElementView } from './image_element';
|
|
@@ -43,7 +44,8 @@ export class FigureElementView extends ImageElementView {
|
|
|
43
44
|
const finalInsertPos = hasFigures ? lastFigureEndPos : figureElementPos + 1;
|
|
44
45
|
const figureNode = state.schema.nodes.figure.create();
|
|
45
46
|
tr.insert(finalInsertPos, figureNode);
|
|
46
|
-
|
|
47
|
+
tr.setSelection(TextSelection.create(tr.doc, finalInsertPos + 1));
|
|
48
|
+
this.view.dispatch(tr.scrollIntoView());
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
initialise() {
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.4.
|
|
1
|
+
export declare const VERSION = "3.4.8";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
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": "3.4.
|
|
4
|
+
"version": "3.4.8",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|