@atlaskit/editor-plugin-save-on-enter 1.3.14 → 1.4.0
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/CHANGELOG.md +18 -0
- package/dist/cjs/saveOnEnterPlugin.js +3 -4
- package/dist/es2019/saveOnEnterPlugin.js +2 -2
- package/dist/esm/saveOnEnterPlugin.js +2 -2
- package/dist/types/saveOnEnterPlugin.d.ts +2 -1
- package/dist/types/saveOnEnterPluginType.d.ts +1 -2
- package/dist/types-ts4.5/saveOnEnterPlugin.d.ts +2 -1
- package/dist/types-ts4.5/saveOnEnterPluginType.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-save-on-enter
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
|
|
8
|
+
[`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
|
|
9
|
+
Bumped editor-prosemirror version to 7.0.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.3.15
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.3.14
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createPlugin =
|
|
7
|
-
exports.saveOnEnterPlugin = void 0;
|
|
6
|
+
exports.saveOnEnterPlugin = exports.createPlugin = void 0;
|
|
8
7
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
9
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
11
|
-
function createPlugin(eventDispatch, onSave) {
|
|
10
|
+
var createPlugin = exports.createPlugin = function createPlugin(eventDispatch, onSave) {
|
|
12
11
|
if (!onSave) {
|
|
13
12
|
return;
|
|
14
13
|
}
|
|
@@ -22,7 +21,7 @@ function createPlugin(eventDispatch, onSave) {
|
|
|
22
21
|
return false;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
|
-
}
|
|
24
|
+
};
|
|
26
25
|
function canSaveOnEnter(editorView) {
|
|
27
26
|
var _ref = editorView.state.selection,
|
|
28
27
|
$cursor = _ref.$cursor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
export
|
|
4
|
+
export const createPlugin = (eventDispatch, onSave) => {
|
|
5
5
|
if (!onSave) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
@@ -15,7 +15,7 @@ export function createPlugin(eventDispatch, onSave) {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
function canSaveOnEnter(editorView) {
|
|
20
20
|
const {
|
|
21
21
|
$cursor
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
export function createPlugin(eventDispatch, onSave) {
|
|
4
|
+
export var createPlugin = function createPlugin(eventDispatch, onSave) {
|
|
5
5
|
if (!onSave) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
@@ -15,7 +15,7 @@ export function createPlugin(eventDispatch, onSave) {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
function canSaveOnEnter(editorView) {
|
|
20
20
|
var _ref = editorView.state.selection,
|
|
21
21
|
$cursor = _ref.$cursor;
|
|
@@ -2,5 +2,6 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { SaveOnEnterPlugin } from './saveOnEnterPluginType';
|
|
5
|
-
export
|
|
5
|
+
export type CreatePlugin = (eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void) => SafePlugin | undefined;
|
|
6
|
+
export declare const createPlugin: CreatePlugin;
|
|
6
7
|
export declare const saveOnEnterPlugin: SaveOnEnterPlugin;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
type Config = (editorView: EditorView) => void;
|
|
3
|
+
export type Config = (editorView: EditorView) => void;
|
|
4
4
|
export type SaveOnEnterPlugin = NextEditorPlugin<'saveOnEnter', {
|
|
5
5
|
pluginConfiguration: Config | undefined;
|
|
6
6
|
}>;
|
|
7
|
-
export {};
|
|
@@ -2,5 +2,6 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { SaveOnEnterPlugin } from './saveOnEnterPluginType';
|
|
5
|
-
export
|
|
5
|
+
export type CreatePlugin = (eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void) => SafePlugin | undefined;
|
|
6
|
+
export declare const createPlugin: CreatePlugin;
|
|
6
7
|
export declare const saveOnEnterPlugin: SaveOnEnterPlugin;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
type Config = (editorView: EditorView) => void;
|
|
3
|
+
export type Config = (editorView: EditorView) => void;
|
|
4
4
|
export type SaveOnEnterPlugin = NextEditorPlugin<'saveOnEnter', {
|
|
5
5
|
pluginConfiguration: Config | undefined;
|
|
6
6
|
}>;
|
|
7
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-save-on-enter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Save-on-enter plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
35
|
-
"@atlaskit/editor-prosemirror": "
|
|
34
|
+
"@atlaskit/editor-common": "^99.10.0",
|
|
35
|
+
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|