@cocreate/text 1.27.0 → 1.27.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.27.1](https://github.com/CoCreate-app/CoCreate-text/compare/v1.27.0...v1.27.1) (2024-06-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * apply custom setValue function on element ([938088a](https://github.com/CoCreate-app/CoCreate-text/commit/938088a9d2caa3046fbac34d7bebf6858296ab74))
7
+
1
8
  # [1.27.0](https://github.com/CoCreate-app/CoCreate-text/compare/v1.26.5...v1.27.0) (2024-06-12)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/text",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "text",
package/src/index.js CHANGED
@@ -103,6 +103,10 @@ function initElement(element) {
103
103
  element.getValue = async () => {
104
104
  return await crdt.getText({ array, object, key })
105
105
  }
106
+ element.setValue = (value) => {
107
+ crdt.replaceText({ array, object, key, value, crud: isCrud, save: isSave, read: isRead });
108
+
109
+ }
106
110
  }
107
111
  }
108
112