This commit is contained in:
2024-07-01 13:17:14 +02:00
parent e80f2b3def
commit dbb2f02049
2 changed files with 7 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "magico-pagebuilder", "name": "magico-pagebuilder",
"version": "0.0.9", "version": "0.0.10",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -190,11 +190,15 @@ export default {
modalCopy: false, modalCopy: false,
pageType: { id: false }, pageType: { id: false },
modalSave: false, modalSave: false,
modalLoad: false modalLoad: false,
descriptionAllegro:false,
} }
}, },
props: ['name', 'modelValue', 'showcopy', 'lang'], props: ['name', 'modelValue', 'showcopy', 'lang'],
mounted: function () { mounted: function () {
if(localStorage.getItem('description_clipboard')){
this.descriptionAllegro=true;
}
//var trimmed = $("#body_pagebuilder").val().replace((/ |\r\n|\n|\r/gm),""); //var trimmed = $("#body_pagebuilder").val().replace((/ |\r\n|\n|\r/gm),"");
var trimmed = this.modelValue //.replace((/{2} |\r\n|\n|\r/gm), ""); var trimmed = this.modelValue //.replace((/{2} |\r\n|\n|\r/gm), "");
try { try {
@@ -211,9 +215,6 @@ export default {
} }
}, },
computed: { computed: {
descriptionAllegro: function(){
return localStorage.getItem('description_clipboard')
}
}, },
created: function () { created: function () {
if (this.name) this.namex = this.name if (this.name) this.namex = this.name
@@ -265,7 +266,7 @@ export default {
this.changeBody() this.changeBody()
}, },
pasteAllegro: function(){ pasteAllegro: function(){
let sections = this.descriptionAllegro; let sections = localStorage.getItem('description_clipboard');
try { try {
sections = JSON.parse(sections); sections = JSON.parse(sections);
} catch (e) { } catch (e) {