Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-contenteditable

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-contenteditable - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

2

dist/vue-contenteditable.cjs.js

@@ -1,3 +0,3 @@

"use strict";var n=require("vue");const s=n.defineComponent({__name:"contenteditable",props:{tag:String,contenteditable:{type:Boolean,default:!0},modelValue:String,noHtml:{type:Boolean,default:!0},noNl:{type:Boolean,default:!1}},emits:{returned:String,"update:modelValue":String},setup(u,{emit:d}){const o=u;function r(e,t,a){return e.split(t).join(a)}const l=n.ref();n.onMounted(()=>{console.log({"element.value":l.value})});function i(){return o.noHtml?l.value.innerText:l.value.innerHTML}function c(e){o.noHtml?l.value.innerText=e:l.value.innerHTML=e}function f(e){d("update:modelValue",i())}function m(e){e.preventDefault();let t=(e.originalEvent||e).clipboardData.getData("text/plain");o.noNl&&(t=r(t,`\r
"use strict";var n=require("vue");const s=n.defineComponent({__name:"contenteditable",props:{tag:String,contenteditable:{type:[Boolean,String],default:!0},modelValue:String,noHtml:{type:Boolean,default:!0},noNl:{type:Boolean,default:!1}},emits:{returned:String,"update:modelValue":String},setup(u,{emit:d}){const o=u;function r(e,t,a){return e.split(t).join(a)}const l=n.ref();n.onMounted(()=>{console.log({"element.value":l.value})});function i(){return o.noHtml?l.value.innerText:l.value.innerHTML}function c(e){o.noHtml?l.value.innerText=e:l.value.innerHTML=e}function f(e){d("update:modelValue",i())}function m(e){e.preventDefault();let t=(e.originalEvent||e).clipboardData.getData("text/plain");o.noNl&&(t=r(t,`\r
`," "),t=r(t,`
`," "),t=r(t,"\r"," ")),window.document.execCommand("insertText",!1,t)}function p(e){e.key=="Enter"&&o.noNl&&(e.preventDefault(),d("returned",i()))}return n.onMounted(()=>{var e;c((e=o.modelValue)!=null?e:"")}),n.watch(()=>o.modelValue,(e,t)=>{e!=i()&&c(e!=null?e:"")}),n.watch(()=>o.noHtml,(e,t)=>{var a;c((a=o.modelValue)!=null?a:"")}),(e,t)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{contenteditable:u.contenteditable,onInput:f,onBlur:f,onPaste:m,onKeypress:p,ref_key:"element",ref:l},null,40,["contenteditable"]))}});module.exports=s;

@@ -90,3 +90,3 @@ declare module "components/__VLS_types" {

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -113,3 +113,3 @@ };

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -140,3 +140,3 @@ };

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -157,3 +157,3 @@ };

}, {
contenteditable: boolean;
contenteditable: string | boolean;
noHtml: boolean;

@@ -167,3 +167,3 @@ noNl: boolean;

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -197,3 +197,3 @@ };

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -216,3 +216,3 @@ };

contenteditable: {
type: BooleanConstructor;
type: (StringConstructor | BooleanConstructor)[];
default: boolean;

@@ -233,3 +233,3 @@ };

}, {
contenteditable: boolean;
contenteditable: string | boolean;
noHtml: boolean;

@@ -236,0 +236,0 @@ noNl: boolean;

@@ -7,3 +7,3 @@ import { defineComponent, ref, onMounted, watch, openBlock, createBlock, resolveDynamicComponent } from "vue";

"contenteditable": {
type: Boolean,
type: [Boolean, String],
default: true

@@ -10,0 +10,0 @@ },

@@ -1,3 +0,3 @@

(function(n,i){typeof exports=="object"&&typeof module!="undefined"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(n=typeof globalThis!="undefined"?globalThis:n||self,n.contenteditable=i(n.Vue))})(this,function(n){"use strict";return n.defineComponent({__name:"contenteditable",props:{tag:String,contenteditable:{type:Boolean,default:!0},modelValue:String,noHtml:{type:Boolean,default:!0},noNl:{type:Boolean,default:!1}},emits:{returned:String,"update:modelValue":String},setup(u,{emit:f}){const o=u;function r(e,t,a){return e.split(t).join(a)}const l=n.ref();n.onMounted(()=>{console.log({"element.value":l.value})});function d(){return o.noHtml?l.value.innerText:l.value.innerHTML}function c(e){o.noHtml?l.value.innerText=e:l.value.innerHTML=e}function m(e){f("update:modelValue",d())}function p(e){e.preventDefault();let t=(e.originalEvent||e).clipboardData.getData("text/plain");o.noNl&&(t=r(t,`\r
(function(n,i){typeof exports=="object"&&typeof module!="undefined"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(n=typeof globalThis!="undefined"?globalThis:n||self,n.contenteditable=i(n.Vue))})(this,function(n){"use strict";return n.defineComponent({__name:"contenteditable",props:{tag:String,contenteditable:{type:[Boolean,String],default:!0},modelValue:String,noHtml:{type:Boolean,default:!0},noNl:{type:Boolean,default:!1}},emits:{returned:String,"update:modelValue":String},setup(u,{emit:f}){const o=u;function r(e,t,a){return e.split(t).join(a)}const l=n.ref();n.onMounted(()=>{console.log({"element.value":l.value})});function d(){return o.noHtml?l.value.innerText:l.value.innerHTML}function c(e){o.noHtml?l.value.innerText=e:l.value.innerHTML=e}function m(e){f("update:modelValue",d())}function p(e){e.preventDefault();let t=(e.originalEvent||e).clipboardData.getData("text/plain");o.noNl&&(t=r(t,`\r
`," "),t=r(t,`
`," "),t=r(t,"\r"," ")),window.document.execCommand("insertText",!1,t)}function s(e){e.key=="Enter"&&o.noNl&&(e.preventDefault(),f("returned",d()))}return n.onMounted(()=>{var e;c((e=o.modelValue)!=null?e:"")}),n.watch(()=>o.modelValue,(e,t)=>{e!=d()&&c(e!=null?e:"")}),n.watch(()=>o.noHtml,(e,t)=>{var a;c((a=o.modelValue)!=null?a:"")}),(e,t)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{contenteditable:u.contenteditable,onInput:m,onBlur:m,onPaste:p,onKeypress:s,ref_key:"element",ref:l},null,40,["contenteditable"]))}})});
{
"name": "vue-contenteditable",
"version": "4.0.1",
"version": "4.0.2",
"author": "Léo Falventin Hauchecorne",

@@ -5,0 +5,0 @@ "description": "This plugin provides a `<contenteditable/>` element supporting `v-model`. It also provides some (optional) features, like preventing html input and paste, or new lines.",

@@ -152,3 +152,3 @@

### 4.0.1
### 4.0.2

@@ -155,0 +155,0 @@ * Add String as contenteditable type (To support non-standard values)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc