fix pagebuilder
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 p-0 text-end">
|
||||
<a href="#" @click.prevent="modalBox = !modalBox" title="Edytuj" class="text-primary me-2"
|
||||
<a href="#" @click.prevent="openModal" title="Edytuj" class="text-primary me-2"
|
||||
><i class="material-icons-outlined">create</i></a
|
||||
>
|
||||
<b-modal
|
||||
@@ -16,16 +16,17 @@
|
||||
:title="langs.label"
|
||||
v-on:hide="onCloseModal"
|
||||
>
|
||||
<div class="mb-4">
|
||||
<div class="form-group">
|
||||
<editor
|
||||
api-key="no-api-key"
|
||||
rows="12"
|
||||
class="form-control"
|
||||
v-if="modalBox"
|
||||
v-model="text"
|
||||
:init="vtinymce"
|
||||
/>
|
||||
<div style="min-height: 400px">
|
||||
<div class="mb-4" v-if="delayModal">
|
||||
<div class="form-group">
|
||||
<editor
|
||||
api-key="no-api-key"
|
||||
rows="12"
|
||||
class="form-control"
|
||||
v-model="text"
|
||||
:init="vtinymce"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
@@ -46,6 +47,7 @@ import MagicoModal from './../MagicoModal.vue'
|
||||
import tinymceConfig from '../tinymce/config.js'
|
||||
|
||||
import Editor from '@tinymce/tinymce-vue'
|
||||
import { nextTick } from 'vue'
|
||||
export default {
|
||||
emits: ['update:modelValue'],
|
||||
components: {
|
||||
@@ -72,9 +74,14 @@ export default {
|
||||
},
|
||||
height: window.innerHeight - window.innerHeight / 4,
|
||||
modalBox: false,
|
||||
delayModal: false,
|
||||
editor: null,
|
||||
text: '',
|
||||
name: 'core_section_textarea',
|
||||
vtinymce: Object.assign(tinymceConfig, {
|
||||
setup: function (e) {
|
||||
console.log(e)
|
||||
},
|
||||
file_picker_callback: (callback) => {
|
||||
if (this.$filechooser) {
|
||||
this.$filechooser.open({
|
||||
@@ -108,6 +115,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openModal: function () {
|
||||
let vm = this
|
||||
this.modalBox = true
|
||||
setTimeout(function () {
|
||||
vm.delayModal = true
|
||||
}, 200)
|
||||
// nextTick(() => {
|
||||
// vm.delayModal = true
|
||||
// })
|
||||
},
|
||||
removeItem: function () {
|
||||
this.$emit('itemRemoved', this.modelValue)
|
||||
},
|
||||
@@ -115,6 +132,7 @@ export default {
|
||||
setTimeout(
|
||||
function () {
|
||||
this.modalBox = false
|
||||
this.delayModal = false
|
||||
this.$emit('update:modelValue', {
|
||||
name: this.name,
|
||||
text: this.text
|
||||
|
||||
Reference in New Issue
Block a user