@atlaskit/editor-plugin-media-insert 1.1.0 → 1.1.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/.eslintrc.js +12 -12
- package/CHANGELOG.md +14 -0
- package/dist/cjs/plugin.js +27 -0
- package/dist/es2019/plugin.js +24 -1
- package/dist/esm/plugin.js +26 -0
- package/package.json +2 -1
package/.eslintrc.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
rules: {
|
|
3
|
+
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
4
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
5
|
+
},
|
|
6
|
+
overrides: [
|
|
7
|
+
{
|
|
8
|
+
files: ['**/__tests__/**/*.{js,ts,tsx}', '**/examples/**/*.{js,ts,tsx}'],
|
|
9
|
+
rules: {
|
|
10
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
14
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media-insert
|
|
2
|
+
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#126568](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126568)
|
|
8
|
+
[`ce40c0ff7852f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ce40c0ff7852f) -
|
|
9
|
+
Add menu item and typeahead for Upload image from URL
|
|
10
|
+
|
|
11
|
+
## 1.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.mediaInsertPlugin = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
10
|
+
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
7
11
|
var mediaInsertPlugin = exports.mediaInsertPlugin = function mediaInsertPlugin() {
|
|
8
12
|
return {
|
|
9
13
|
name: 'mediaInsert',
|
|
@@ -11,9 +15,32 @@ var mediaInsertPlugin = exports.mediaInsertPlugin = function mediaInsertPlugin()
|
|
|
11
15
|
return [{
|
|
12
16
|
name: 'mediaInsert',
|
|
13
17
|
plugin: function plugin() {
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.log('mediaInsert plugin');
|
|
14
20
|
return undefined;
|
|
15
21
|
}
|
|
16
22
|
}];
|
|
23
|
+
},
|
|
24
|
+
pluginsOptions: {
|
|
25
|
+
quickInsert: function quickInsert(_ref) {
|
|
26
|
+
var formatMessage = _ref.formatMessage;
|
|
27
|
+
return [{
|
|
28
|
+
id: 'media-insert',
|
|
29
|
+
title: formatMessage(_messages.toolbarInsertBlockMessages.insertMediaFromUrl),
|
|
30
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.insertMediaFromUrlDescription),
|
|
31
|
+
priority: 400,
|
|
32
|
+
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video'],
|
|
33
|
+
icon: function icon() {
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconImages, null);
|
|
35
|
+
},
|
|
36
|
+
action: function action(insert) {
|
|
37
|
+
return insert({
|
|
38
|
+
type: 'paragraph',
|
|
39
|
+
content: []
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}];
|
|
43
|
+
}
|
|
17
44
|
}
|
|
18
45
|
};
|
|
19
46
|
};
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { IconImages } from '@atlaskit/editor-common/quick-insert';
|
|
1
4
|
export const mediaInsertPlugin = () => {
|
|
2
5
|
return {
|
|
3
6
|
name: 'mediaInsert',
|
|
4
7
|
pmPlugins: () => [{
|
|
5
8
|
name: 'mediaInsert',
|
|
6
9
|
plugin: () => {
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
11
|
+
console.log('mediaInsert plugin');
|
|
7
12
|
return undefined;
|
|
8
13
|
}
|
|
9
|
-
}]
|
|
14
|
+
}],
|
|
15
|
+
pluginsOptions: {
|
|
16
|
+
quickInsert: ({
|
|
17
|
+
formatMessage
|
|
18
|
+
}) => [{
|
|
19
|
+
id: 'media-insert',
|
|
20
|
+
title: formatMessage(messages.insertMediaFromUrl),
|
|
21
|
+
description: formatMessage(messages.insertMediaFromUrlDescription),
|
|
22
|
+
priority: 400,
|
|
23
|
+
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video'],
|
|
24
|
+
icon: () => /*#__PURE__*/React.createElement(IconImages, null),
|
|
25
|
+
action(insert) {
|
|
26
|
+
return insert({
|
|
27
|
+
type: 'paragraph',
|
|
28
|
+
content: []
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}]
|
|
32
|
+
}
|
|
10
33
|
};
|
|
11
34
|
};
|
package/dist/esm/plugin.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { IconImages } from '@atlaskit/editor-common/quick-insert';
|
|
1
4
|
export var mediaInsertPlugin = function mediaInsertPlugin() {
|
|
2
5
|
return {
|
|
3
6
|
name: 'mediaInsert',
|
|
@@ -5,9 +8,32 @@ export var mediaInsertPlugin = function mediaInsertPlugin() {
|
|
|
5
8
|
return [{
|
|
6
9
|
name: 'mediaInsert',
|
|
7
10
|
plugin: function plugin() {
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.log('mediaInsert plugin');
|
|
8
13
|
return undefined;
|
|
9
14
|
}
|
|
10
15
|
}];
|
|
16
|
+
},
|
|
17
|
+
pluginsOptions: {
|
|
18
|
+
quickInsert: function quickInsert(_ref) {
|
|
19
|
+
var formatMessage = _ref.formatMessage;
|
|
20
|
+
return [{
|
|
21
|
+
id: 'media-insert',
|
|
22
|
+
title: formatMessage(messages.insertMediaFromUrl),
|
|
23
|
+
description: formatMessage(messages.insertMediaFromUrlDescription),
|
|
24
|
+
priority: 400,
|
|
25
|
+
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video'],
|
|
26
|
+
icon: function icon() {
|
|
27
|
+
return /*#__PURE__*/React.createElement(IconImages, null);
|
|
28
|
+
},
|
|
29
|
+
action: function action(insert) {
|
|
30
|
+
return insert({
|
|
31
|
+
type: 'paragraph',
|
|
32
|
+
content: []
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}];
|
|
36
|
+
}
|
|
11
37
|
}
|
|
12
38
|
};
|
|
13
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media-insert",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Media Insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
".": "./src/index.ts"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
27
28
|
"@babel/runtime": "^7.0.0"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|