leksy-editor 1.0.0 → 1.0.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/constant.js CHANGED
@@ -122,7 +122,7 @@ const SVG = {
122
122
 
123
123
 
124
124
  const MIMETYPE = {
125
- IMAGE: 'image/png,image/jpg,image/jpeg',
125
+ IMAGE: 'image/png,image/jpg,image/jpeg,image/webp',
126
126
  VIDEO: 'video/mp4,video/quicktime',
127
127
  }
128
128
 
package/index.js CHANGED
@@ -56,7 +56,7 @@ class LeksyEditor {
56
56
  const selection = core.elements.iframeWindow.getSelection();
57
57
  let caretOffset = null;
58
58
 
59
- if (selection.rangeCount > 0) {
59
+ if (selection?.rangeCount > 0) {
60
60
  const range = selection.getRangeAt(0);
61
61
  const preCaretRange = range.cloneRange();
62
62
  preCaretRange.selectNodeContents(core.elements.editor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leksy-editor",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Leksy Editor is an alternative to traditional WYSIWYG editors, designed primarily for creating mail templates, blogs, and documents without any content manipulation.",
5
5
  "main": "index.js",
6
6
  "directories": {
package/plugin.js CHANGED
@@ -729,7 +729,7 @@ const PLUGINS = {
729
729
  span.innerText = 'Image not selected';
730
730
  return;
731
731
  }
732
-
732
+ button.disabled = true;
733
733
  const img = document.createElement('img');
734
734
  img.src = await core.manuplateImage('base64', base64String);
735
735
  img.alt = altInput.value || "";