@cocreate/text 1.15.12 → 1.15.15
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 +21 -0
- package/CoCreate.config.js +1 -1
- package/demo/test-webpage.html +1 -1
- package/package.json +1 -1
- package/src/index.js +12 -5
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## [1.15.15](https://github.com/CoCreate-app/CoCreate-text/compare/v1.15.14...v1.15.15) (2022-05-06)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* update config organization_Id to organization_id ([4c363f2](https://github.com/CoCreate-app/CoCreate-text/commit/4c363f2c0709082f85a59b514ca57fcbb0d19627))
|
7
|
+
|
8
|
+
## [1.15.14](https://github.com/CoCreate-app/CoCreate-text/compare/v1.15.13...v1.15.14) (2022-04-30)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* activeCursor element defined on window object ([88e4575](https://github.com/CoCreate-app/CoCreate-text/commit/88e457592fac304ffd02e56c491688d598838e6f))
|
14
|
+
|
15
|
+
## [1.15.13](https://github.com/CoCreate-app/CoCreate-text/compare/v1.15.12...v1.15.13) (2022-03-22)
|
16
|
+
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
* removed emit from message.send and message.listen ([b672bb5](https://github.com/CoCreate-app/CoCreate-text/commit/b672bb57ee7005a0d1933bd014c079a6faa96cbd))
|
21
|
+
|
1
22
|
## [1.15.12](https://github.com/CoCreate-app/CoCreate-text/compare/v1.15.11...v1.15.12) (2022-03-21)
|
2
23
|
|
3
24
|
|
package/CoCreate.config.js
CHANGED
package/demo/test-webpage.html
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -112,11 +112,14 @@ function _mousedown (event) {
|
|
112
112
|
// const path = event.path || (event.composedPath && event.composedPath());
|
113
113
|
// console.log(path)
|
114
114
|
if (!target.id){
|
115
|
-
|
116
|
-
if (
|
117
|
-
|
118
|
-
|
119
|
-
|
115
|
+
let isEid = domTextEditor.getAttribute('eid');
|
116
|
+
if (isEid != 'false' && isEid != null && isEid != undefined){
|
117
|
+
let eid = target.getAttribute('eid');
|
118
|
+
if (!eid){
|
119
|
+
eid = uuid.generate(6);
|
120
|
+
setAttribute({ domTextEditor, target, name: 'eid', value: eid });
|
121
|
+
}
|
122
|
+
}
|
120
123
|
}
|
121
124
|
let contentEditable = target.closest('[collection][document_id][name]');
|
122
125
|
if (contentEditable){
|
@@ -254,6 +257,7 @@ export function sendPosition (element) {
|
|
254
257
|
return;
|
255
258
|
previousPosition = currentPosition;
|
256
259
|
element.activeElement = element;
|
260
|
+
window.activeElement = element;
|
257
261
|
cursors.sendPosition({ collection, document_id, name, start, end });
|
258
262
|
}
|
259
263
|
|
@@ -308,7 +312,10 @@ function updateElements({elements, collection, document_id, name, value, start,
|
|
308
312
|
|
309
313
|
async function updateElement ({element, collection, document_id, name, value, start, length, string }) {
|
310
314
|
if (element.tagName == 'IFRAME') {
|
315
|
+
let eid = element.getAttribute('eid')
|
311
316
|
element = element.contentDocument.documentElement;
|
317
|
+
if (eid != 'false' && eid != null && eid != undefined)
|
318
|
+
element.setAttribute('eid', eid)
|
312
319
|
if (element.contenteditable != 'false')
|
313
320
|
element.contentEditable = true;
|
314
321
|
}
|