@elliemae/ds-wysiwygeditor 2.0.0-alpha.7 → 2.0.0-next.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.
@@ -207,7 +207,6 @@ class DSWYSIWYGEditorImpl extends React__default["default"].PureComponent {
207
207
  value: value,
208
208
  style: {
209
209
  height,
210
- overflow: 'scroll',
211
210
  borderBottom: '1px solid #ccc'
212
211
  }
213
212
  }, editorProps), {}, {
@@ -8,6 +8,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
8
8
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
9
9
 
10
10
  const sanitizeProtocol = value => {
11
+ if (typeof value === 'boolean') return value;
11
12
  let newVal = value;
12
13
 
13
14
  if (!value.startsWith('http') && !value.startsWith('ftp') && !value.startsWith('mailto:') && !value.startsWith('{{')) {
@@ -49,7 +50,9 @@ class LinkFormat extends Link {
49
50
  }
50
51
 
51
52
  static formats(domNode) {
52
- return domNode.getAttribute('href');
53
+ var _domNode$getAttribute;
54
+
55
+ return domNode === null || domNode === void 0 ? void 0 : (_domNode$getAttribute = domNode.getAttribute) === null || _domNode$getAttribute === void 0 ? void 0 : _domNode$getAttribute.call(domNode, 'href');
53
56
  }
54
57
 
55
58
  static sanitize(url) {
@@ -57,9 +60,11 @@ class LinkFormat extends Link {
57
60
  }
58
61
 
59
62
  format(name, value) {
60
- const newVal = sanitizeProtocol(value);
63
+ const newVal = sanitizeProtocol(value); // Remove link case
61
64
 
62
- if (name !== this.statics.blotName || !newVal) {
65
+ if (name === 'link' && value === false) {
66
+ this.domNode.removeAttribute('href');
67
+ } else if (name !== this.statics.blotName || !newVal) {
63
68
  super.format(name, newVal);
64
69
  } else {
65
70
  this.domNode.setAttribute('href', this.constructor.sanitize(newVal));
@@ -196,7 +196,6 @@ class DSWYSIWYGEditorImpl extends React.PureComponent {
196
196
  value: value,
197
197
  style: {
198
198
  height,
199
- overflow: 'scroll',
200
199
  borderBottom: '1px solid #ccc'
201
200
  }
202
201
  }, editorProps), {}, {
@@ -2,6 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import { Quill } from 'react-quill';
3
3
 
4
4
  const sanitizeProtocol = value => {
5
+ if (typeof value === 'boolean') return value;
5
6
  let newVal = value;
6
7
 
7
8
  if (!value.startsWith('http') && !value.startsWith('ftp') && !value.startsWith('mailto:') && !value.startsWith('{{')) {
@@ -43,7 +44,9 @@ class LinkFormat extends Link {
43
44
  }
44
45
 
45
46
  static formats(domNode) {
46
- return domNode.getAttribute('href');
47
+ var _domNode$getAttribute;
48
+
49
+ return domNode === null || domNode === void 0 ? void 0 : (_domNode$getAttribute = domNode.getAttribute) === null || _domNode$getAttribute === void 0 ? void 0 : _domNode$getAttribute.call(domNode, 'href');
47
50
  }
48
51
 
49
52
  static sanitize(url) {
@@ -51,9 +54,11 @@ class LinkFormat extends Link {
51
54
  }
52
55
 
53
56
  format(name, value) {
54
- const newVal = sanitizeProtocol(value);
57
+ const newVal = sanitizeProtocol(value); // Remove link case
55
58
 
56
- if (name !== this.statics.blotName || !newVal) {
59
+ if (name === 'link' && value === false) {
60
+ this.domNode.removeAttribute('href');
61
+ } else if (name !== this.statics.blotName || !newVal) {
57
62
  super.format(name, newVal);
58
63
  } else {
59
64
  this.domNode.setAttribute('href', this.constructor.sanitize(newVal));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-wysiwygeditor",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.0.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - WYSIWYG Editor",
6
6
  "module": "./esm/index.js",
@@ -84,11 +84,11 @@
84
84
  "build": "node ../../scripts/build/build.js"
85
85
  },
86
86
  "dependencies": {
87
- "@elliemae/ds-basic": "2.0.0-alpha.7",
88
- "@elliemae/ds-classnames": "2.0.0-alpha.7",
89
- "@elliemae/ds-imagelibrarymodal": "2.0.0-alpha.7",
90
- "@elliemae/ds-shared": "2.0.0-alpha.7",
91
- "@elliemae/ds-uploader": "2.0.0-alpha.7",
87
+ "@elliemae/ds-basic": "2.0.0-next.1",
88
+ "@elliemae/ds-classnames": "2.0.0-next.1",
89
+ "@elliemae/ds-imagelibrarymodal": "2.0.0-next.1",
90
+ "@elliemae/ds-shared": "2.0.0-next.1",
91
+ "@elliemae/ds-uploader": "2.0.0-next.1",
92
92
  "immutable": "4.0.0-rc.14",
93
93
  "quill-blot-formatter": "~1.0.5",
94
94
  "react-quill": "2.0.0-beta1"