@bbl-digital/snorre 3.0.37 → 3.0.38

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -32160,12 +32160,16 @@
32160
32160
  if (!editor) return;
32161
32161
 
32162
32162
  if (overrideValue === null) {
32163
- editor?.resetContent('');
32163
+ editor?.selection.setContent('', {
32164
+ no_selection: true
32165
+ });
32164
32166
  return;
32165
32167
  }
32166
32168
 
32167
32169
  if (!overrideValue?.length) return;
32168
- editor.resetContent(overrideValue); // eslint-disable-next-line react-hooks/exhaustive-deps
32170
+ editor.selection.setContent(overrideValue, {
32171
+ no_selection: true
32172
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
32169
32173
  }, [overrideValue]);
32170
32174
  return jsxRuntime$1.jsxs("div", {
32171
32175
  css: theme => [styles$3.default(theme), !loaded && styles$3.hideEditor],
@@ -56,12 +56,16 @@ const Editor = ({
56
56
  if (!editor) return;
57
57
 
58
58
  if (overrideValue === null) {
59
- editor?.resetContent('');
59
+ editor?.selection.setContent('', {
60
+ no_selection: true
61
+ });
60
62
  return;
61
63
  }
62
64
 
63
65
  if (!overrideValue?.length) return;
64
- editor.resetContent(overrideValue); // eslint-disable-next-line react-hooks/exhaustive-deps
66
+ editor.selection.setContent(overrideValue, {
67
+ no_selection: true
68
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
65
69
  }, [overrideValue]);
66
70
  return _jsxs("div", {
67
71
  css: theme => [styles.default(theme), !loaded && styles.hideEditor],
@@ -56,12 +56,16 @@ const Editor = ({
56
56
  if (!editor) return;
57
57
 
58
58
  if (overrideValue === null) {
59
- editor?.resetContent('');
59
+ editor?.selection.setContent('', {
60
+ no_selection: true
61
+ });
60
62
  return;
61
63
  }
62
64
 
63
65
  if (!overrideValue?.length) return;
64
- editor.resetContent(overrideValue); // eslint-disable-next-line react-hooks/exhaustive-deps
66
+ editor.selection.setContent(overrideValue, {
67
+ no_selection: true
68
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
65
69
  }, [overrideValue]);
66
70
  return _jsxs("div", {
67
71
  css: theme => [styles.default(theme), !loaded && styles.hideEditor],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "3.0.37",
3
+ "version": "3.0.38",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",