@mixd-id/web-scaffold 0.1.230406361 → 0.1.230406363

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406361",
4
+ "version": "0.1.230406363",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -484,13 +484,13 @@ export default{
484
484
 
485
485
  if(this.newImage.element){
486
486
  const aDiv = document.createElement("div")
487
- aDiv.innerHTML = "<img src=\"" + url + "\" " + propHtml.join(' ') + "/>"
487
+ aDiv.innerHTML = "<img src=\"" + url + "\" " + propHtml.join(' ') + " class='inline'/>"
488
488
  this.newImage.element.parentNode.replaceChild(aDiv.firstChild, this.newImage.element)
489
489
  }
490
490
 
491
491
  else{
492
492
  document.execCommand("insertHTML", false,
493
- "<img src=\"" + url + "\" " + propHtml.join(' ') + "/>");
493
+ "<img src=\"" + url + "\" " + propHtml.join(' ') + " class='inline'/>");
494
494
  }
495
495
 
496
496
  this.$refs.imageModal.close()
@@ -7,6 +7,7 @@
7
7
  v-html="html"
8
8
  :class="`${$style.content}${itemClass ? ' ' + itemClass : ''}`"
9
9
  @blur="saveSelection($refs.html)"
10
+ @paste="onPaste"
10
11
  @input="onInput"></span>
11
12
 
12
13
  <button v-if="variant === 'minimal'" type="button" class="p-3" @click="$refs.modal.open()">
@@ -173,6 +174,12 @@ export default{
173
174
  e.target.parentNode.removeChild(e.target)
174
175
  },
175
176
 
177
+ onPaste(e){
178
+ e.preventDefault()
179
+ const text = e.clipboardData.getData('text/plain')
180
+ document.execCommand('insertText', false, text)
181
+ },
182
+
176
183
  onInput(){
177
184
 
178
185
  const arr = []