@bbl-digital/snorre 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -35566,8 +35566,6 @@ to {top: 100vh;}
35566
35566
  React.useEffect(() => {
35567
35567
  if (!isMounted.current) {
35568
35568
  const editor = document.createElement('div');
35569
- editor.id = id || name || 'quill-editor';
35570
- editor.setAttribute('name', name || id || 'quill-editor');
35571
35569
  containerRef.current?.appendChild(editor);
35572
35570
  const quillInstance = new Quill__default["default"](editor, {
35573
35571
  theme: 'snow',
@@ -35579,6 +35577,11 @@ to {top: 100vh;}
35579
35577
  bounds,
35580
35578
  readOnly
35581
35579
  });
35580
+ const editorActual = editor.querySelector('.ql-editor');
35581
+ if (editorActual) {
35582
+ editorActual.setAttribute('id', id || 'ql-editor');
35583
+ editorActual.setAttribute('name', name || 'ql-editor');
35584
+ }
35582
35585
  quillInstance.keyboard.addBinding({
35583
35586
  key: 'Backspace'
35584
35587
  }, {
@@ -163,8 +163,6 @@ const QuillEditor = ({
163
163
  useEffect(() => {
164
164
  if (!isMounted.current) {
165
165
  const editor = document.createElement('div');
166
- editor.id = id || name || 'quill-editor';
167
- editor.setAttribute('name', name || id || 'quill-editor');
168
166
  containerRef.current?.appendChild(editor);
169
167
  const quillInstance = new Quill(editor, {
170
168
  theme: 'snow',
@@ -176,6 +174,11 @@ const QuillEditor = ({
176
174
  bounds,
177
175
  readOnly
178
176
  });
177
+ const editorActual = editor.querySelector('.ql-editor');
178
+ if (editorActual) {
179
+ editorActual.setAttribute('id', id || 'ql-editor');
180
+ editorActual.setAttribute('name', name || 'ql-editor');
181
+ }
179
182
  quillInstance.keyboard.addBinding({
180
183
  key: 'Backspace'
181
184
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgQ3C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsQ3C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -163,8 +163,6 @@ const QuillEditor = ({
163
163
  useEffect(() => {
164
164
  if (!isMounted.current) {
165
165
  const editor = document.createElement('div');
166
- editor.id = id || name || 'quill-editor';
167
- editor.setAttribute('name', name || id || 'quill-editor');
168
166
  containerRef.current?.appendChild(editor);
169
167
  const quillInstance = new Quill(editor, {
170
168
  theme: 'snow',
@@ -176,6 +174,11 @@ const QuillEditor = ({
176
174
  bounds,
177
175
  readOnly
178
176
  });
177
+ const editorActual = editor.querySelector('.ql-editor');
178
+ if (editorActual) {
179
+ editorActual.setAttribute('id', id || 'ql-editor');
180
+ editorActual.setAttribute('name', name || 'ql-editor');
181
+ }
179
182
  quillInstance.keyboard.addBinding({
180
183
  key: 'Backspace'
181
184
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",