@bigbinary/neeto-editor 1.31.3-beta.0 → 1.31.3-beta.1
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/README.md +56 -30
- package/index.cjs.js +8 -11
- package/index.cjs.js.map +1 -1
- package/index.js +8 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,12 @@ The **neetoEditor** library drives the rich text experience in the
|
|
|
8
8
|
yarn add @bigbinary/neeto-editor
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Dependencies
|
|
12
|
+
|
|
13
|
+
**neetoEditor** has few peer dependencies which are required to use neetoEditor
|
|
14
|
+
properly. Make sure you install all the peerDependencies mentioned in the
|
|
15
|
+
[package.json](./package.json)
|
|
16
|
+
|
|
11
17
|
For setting up image upload refer
|
|
12
18
|
https://neeto-editor.neeto.com/?path=/docs/examples-customize-options-addons--addons.
|
|
13
19
|
|
|
@@ -22,62 +28,82 @@ yarn
|
|
|
22
28
|
Running the `yarn storybook` command starts a storybook application. Use this
|
|
23
29
|
application to test out changes.
|
|
24
30
|
|
|
25
|
-
When developing frontend packages, it's crucial to test changes in a live
|
|
26
|
-
There are two ways to do this:
|
|
31
|
+
When developing frontend packages, it's crucial to test changes in a live
|
|
32
|
+
environment using a host application. There are two ways to do this:
|
|
27
33
|
|
|
28
34
|
1. Using yalc package manager: https://youtu.be/F4zZFnrNTq8
|
|
29
35
|
|
|
30
|
-
> Note: If you are using yalc, you need to run `yarn bundle` after making
|
|
36
|
+
> Note: If you are using yalc, you need to run `yarn bundle` after making
|
|
37
|
+
> changes to the package instead of `yarn build` which is described in the
|
|
38
|
+
> video.
|
|
31
39
|
|
|
32
40
|
2. Directly updating the node_modules of the host application.
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
1. Start the host application server
|
|
43
|
+
2. Inside the package, execute the command:
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
```
|
|
46
|
+
yarn bundle --watch --app ../neeto-site-web
|
|
47
|
+
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
Here replace ../neeto-site-web with path to the host project.
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
Now, any changes made to the neetoEditor codebase will be instantly
|
|
52
|
+
reflected in the UI.
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
3. Remove local installation
|
|
46
55
|
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
yarn install --check-files
|
|
50
|
-
```
|
|
56
|
+
Run the following command to reset to the initial state.
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
```
|
|
59
|
+
yarn install --check-files
|
|
60
|
+
```
|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
4. Translation File Changes (optional)
|
|
55
63
|
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
Modifications in the neeto-editor translation files will not automatically
|
|
65
|
+
update the UI. To verify these changes, update your
|
|
66
|
+
neeto-site-web/app/javascript/packs/application.js file with the following
|
|
67
|
+
code:
|
|
58
68
|
|
|
59
|
-
|
|
69
|
+
```
|
|
70
|
+
import en from "translations/en.json";
|
|
60
71
|
|
|
61
|
-
|
|
72
|
+
import editorEn from "neetofilters/app/javascript/src/translations/en.json";
|
|
62
73
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
import { mergeDeepLeft } from "ramda";
|
|
75
|
+
|
|
76
|
+
initializeApplication({
|
|
77
|
+
translationResources: { en: { translation: mergeDeepLeft(editorEn, en) } },
|
|
78
|
+
});
|
|
79
|
+
```
|
|
67
80
|
|
|
68
81
|
## Instructions for Publishing
|
|
69
82
|
|
|
70
83
|
### Package Release Process
|
|
71
84
|
|
|
72
|
-
A package is released upon merging a PR labeled as patch, minor, or major into
|
|
85
|
+
A package is released upon merging a PR labeled as patch, minor, or major into
|
|
86
|
+
the main branch. The patch label addresses bug fixes, minor signifies the
|
|
87
|
+
addition of new features, and major denotes breaking changes, adhering to the
|
|
88
|
+
principles outlined in [Semantic Versioning (SemVer)](https://semver.org/).
|
|
73
89
|
|
|
74
|
-
You can checkout the Create and publish releases workflow in GitHub Actions to
|
|
90
|
+
You can checkout the Create and publish releases workflow in GitHub Actions to
|
|
91
|
+
get a live update.
|
|
75
92
|
|
|
76
93
|
### Manual Package Publishing
|
|
77
94
|
|
|
78
|
-
If you missed adding the label, you can manually publish the package. For that
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
If you missed adding the label, you can manually publish the package. For that
|
|
96
|
+
first, you need to create a PR to update the version number in the package.json
|
|
97
|
+
file and merge it into the main branch. After merging the PR, you need to create
|
|
98
|
+
a
|
|
99
|
+
[new GitHub release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)
|
|
100
|
+
from the main branch. Whenever a new release is created with a new version
|
|
101
|
+
number, the GitHub actions will automatically publish the built package to npm.
|
|
102
|
+
You can check out the Publish to npm workflow in GitHub Actions to get a live
|
|
103
|
+
update.
|
|
104
|
+
|
|
105
|
+
> Note: before publishing the package, you must verify the functionality in host
|
|
106
|
+
> application [locally](#instructions-for-development).
|
|
81
107
|
|
|
82
108
|
## Documentation
|
|
83
109
|
|
package/index.cjs.js
CHANGED
|
@@ -40507,8 +40507,9 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
40507
40507
|
return false;
|
|
40508
40508
|
});
|
|
40509
40509
|
_defineProperty(_this, "handleSelect", function (emoji) {
|
|
40510
|
+
var _this$props$setActive, _this$props;
|
|
40510
40511
|
_this.props.editor.chain().focus().deleteRange(_this.props.range).setEmoji(emoji).run();
|
|
40511
|
-
_this.props.setActive(false);
|
|
40512
|
+
(_this$props$setActive = (_this$props = _this.props).setActive) === null || _this$props$setActive === void 0 || _this$props$setActive.call(_this$props, false);
|
|
40512
40513
|
});
|
|
40513
40514
|
return _this;
|
|
40514
40515
|
}
|
|
@@ -40549,9 +40550,9 @@ EmojiPickerMenu.defaultProps = {
|
|
|
40549
40550
|
|
|
40550
40551
|
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
40551
40552
|
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
40553
|
+
var EmojiPickerPluginKey = new PluginKey("emoji-picker");
|
|
40552
40554
|
var EmojiPicker = Node.create({
|
|
40553
|
-
name: "
|
|
40554
|
-
key: new PluginKey("emoji-picker"),
|
|
40555
|
+
name: "emojiPicker",
|
|
40555
40556
|
group: "inline",
|
|
40556
40557
|
inline: true,
|
|
40557
40558
|
selectable: false,
|
|
@@ -40561,7 +40562,7 @@ var EmojiPicker = Node.create({
|
|
|
40561
40562
|
suggestion: {
|
|
40562
40563
|
"char": "::",
|
|
40563
40564
|
startOfLine: false,
|
|
40564
|
-
pluginKey:
|
|
40565
|
+
pluginKey: EmojiPickerPluginKey,
|
|
40565
40566
|
items: function items() {
|
|
40566
40567
|
return [];
|
|
40567
40568
|
},
|
|
@@ -41334,8 +41335,6 @@ var linkInputRule = function linkInputRule(config) {
|
|
|
41334
41335
|
});
|
|
41335
41336
|
};
|
|
41336
41337
|
var Link = extensionLink.Link.extend({
|
|
41337
|
-
name: "custom-link",
|
|
41338
|
-
key: new PluginKey("custom-link"),
|
|
41339
41338
|
inclusive: false,
|
|
41340
41339
|
addAttributes: function addAttributes() {
|
|
41341
41340
|
var _this$parent;
|
|
@@ -41562,8 +41561,6 @@ var suggestion$1 = {
|
|
|
41562
41561
|
}
|
|
41563
41562
|
};
|
|
41564
41563
|
var Mentions$1 = Mention__default["default"].extend({
|
|
41565
|
-
name: "mentions",
|
|
41566
|
-
key: new PluginKey("mentions"),
|
|
41567
41564
|
addCommands: function addCommands() {
|
|
41568
41565
|
var _this = this;
|
|
41569
41566
|
return {
|
|
@@ -42559,6 +42556,7 @@ var SlashCommands = {
|
|
|
42559
42556
|
var _excluded$6 = ["suggestion"];
|
|
42560
42557
|
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42561
42558
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
42559
|
+
var SpecialMentionPluginKey = new PluginKey("special-mention");
|
|
42562
42560
|
var renderLabel = function renderLabel(_ref) {
|
|
42563
42561
|
var _node$attrs$label;
|
|
42564
42562
|
var options = _ref.options,
|
|
@@ -42567,7 +42565,7 @@ var renderLabel = function renderLabel(_ref) {
|
|
|
42567
42565
|
};
|
|
42568
42566
|
var suggestion = {
|
|
42569
42567
|
"char": "@@",
|
|
42570
|
-
pluginKey:
|
|
42568
|
+
pluginKey: SpecialMentionPluginKey,
|
|
42571
42569
|
render: function render() {
|
|
42572
42570
|
var reactRenderer;
|
|
42573
42571
|
var popup;
|
|
@@ -42612,8 +42610,7 @@ var suggestion = {
|
|
|
42612
42610
|
}
|
|
42613
42611
|
};
|
|
42614
42612
|
var SpecialMentions = Mention__default["default"].extend({
|
|
42615
|
-
name: "special-
|
|
42616
|
-
key: new PluginKey("special-mentions"),
|
|
42613
|
+
name: "special-mention",
|
|
42617
42614
|
renderHTML: function renderHTML(_ref2) {
|
|
42618
42615
|
var node = _ref2.node,
|
|
42619
42616
|
HTMLAttributes = _ref2.HTMLAttributes;
|