@cocreate/selection 1.4.5 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +22 -0
- package/CoCreate.config.js +2 -2
- package/demo/index.html +1 -1
- package/package.json +1 -1
- package/src/index.js +5 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
## [1.4.8](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.7...v1.4.8) (2022-05-06)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* update config organization_Id to organization_id ([e32a5a8](https://github.com/CoCreate-app/CoCreate-selection/commit/e32a5a827463d1051a8867e3b045b969ae01f8a8))
|
7
|
+
|
8
|
+
## [1.4.7](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.6...v1.4.7) (2022-03-24)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* if insert position is beforeend and the previousSibling is a textnode type=textNode ([031eac5](https://github.com/CoCreate-app/CoCreate-selection/commit/031eac52fdada4eb54675e64a07394a92c616b6e))
|
14
|
+
* typo if condition ended with ; and type updated to position for afterbegin ([b916009](https://github.com/CoCreate-app/CoCreate-selection/commit/b91600977f60c43071b06dc66e6ef48ab7fcfc34))
|
15
|
+
|
16
|
+
## [1.4.6](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.5...v1.4.6) (2022-02-24)
|
17
|
+
|
18
|
+
|
19
|
+
### Bug Fixes
|
20
|
+
|
21
|
+
* CoCreate.config replace CoCreate.app with * ([6b1077c](https://github.com/CoCreate-app/CoCreate-selection/commit/6b1077c13ae6d5d7d9d0ad71422e2a4282ccb3f9))
|
22
|
+
|
1
23
|
## [1.4.5](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.4...v1.4.5) (2022-02-16)
|
2
24
|
|
3
25
|
|
package/CoCreate.config.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module.exports = {
|
2
2
|
"config": {
|
3
3
|
"apiKey": "2061acef-0451-4545-f754-60cf8160",
|
4
|
-
"
|
4
|
+
"organization_id": "5ff747727005da1c272740ab",
|
5
5
|
"host": "general.cocreate.app"
|
6
6
|
},
|
7
7
|
|
@@ -14,7 +14,7 @@ module.exports = {
|
|
14
14
|
"name": "index.html",
|
15
15
|
"path": "/docs/selection/index.html",
|
16
16
|
"domains": [
|
17
|
-
"
|
17
|
+
"*",
|
18
18
|
"general.cocreate.app"
|
19
19
|
],
|
20
20
|
"directory": "/docs/selection",
|
package/demo/index.html
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -188,10 +188,13 @@ export function getElementPosition(str, start, end) {
|
|
188
188
|
element = insert.target;
|
189
189
|
position = insert.position;
|
190
190
|
type = 'insertAdjacent';
|
191
|
-
if(!position)
|
191
|
+
if (!position)
|
192
192
|
type = 'textNode';
|
193
|
-
if (
|
193
|
+
if (position == 'beforeend' && findEl.previousSibling && findEl.previousSibling.nodeType == 3 )
|
194
|
+
type = 'textNode';
|
195
|
+
if (type == 'textNode' || position == 'afterbegin')
|
194
196
|
nodeStart = start - angleEnd - 1;
|
197
|
+
|
195
198
|
findEl.remove();
|
196
199
|
}
|
197
200
|
}
|