Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Height doesnt get applied? #382

Open
LaupWing opened this issue Jun 2, 2023 · 2 comments
Open

Height doesnt get applied? #382

LaupWing opened this issue Jun 2, 2023 · 2 comments
Labels

Comments

@LaupWing
Copy link

LaupWing commented Jun 2, 2023

<template>
   <div 
      class="my-4 w-full cursor-pointer relative hover:border-highlight border"
      :class="template.is_new 
         ? 'border-highlight shadow shadow-highlight' 
         : 'border-border' 
      "
      @click="showModal = true"
   >
      <TemplatesModal
         v-if="showModal"
         :template="template"
         @close="showModal = false"
         @saved="$emit('saved', $event)"
      />
      <div class="pointer-events-none">
         <Editor
            v-model="template.content"
            :disabled="true"
            :init="settings"
            :apiKey="config.tiny_api_key"
         />
      </div>
   </div>
</template>

<script setup lang="ts">
export interface Props {
   template: Template
}
import type { Template } from "@/typings"
import Editor from "@tinymce/tinymce-vue"
import { ref } from "vue"
import { TemplatesModal } from "@/components/Modals"
import config from "@/config"

defineEmits(["saved"])

const settings = {
   plugins: "autoresize",
   menubar: false,
   statusbar: false,
   height: "auto" // 500 also doesnt work,
   toolbar: false,
   auto_resize: true,
   resize: "both",
   content_style: config.templates.templateCss,
}

defineProps<Props>()

const showModal = ref(false)

</script>
@LaupWing
Copy link
Author

LaupWing commented Jun 2, 2023

There is an automatic height assigned to the editor element

Copy link

Ref: INT-3187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants