0.0.13 • Published 6 months ago

tock-vue-kit-editor v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

tock-vue-kit-editor

A Vue 3 component for easy editing of Tock Vue Kit options and css variables

Demo

Try the Tock Vue Kit (and the Tock Vue Kit Editor) on the demo page

Prerequisites

A Vue 3 application integrating the Tock Vue Kit

Quick Start

Install the Tock Vue Kit and the Tock Vue Kit Editor :

npm install tock-vue-kit
npm install tock-vue-kit-editor

Initialize the Tock Vue Kit and then call the editor component :

<script setup lang="ts">
  import "tock-vue-kit/dist/style.css";
  import { renderChat } from "tock-vue-kit";

  import "tock-vue-kit-editor/dist/style.css";
  import { TvkEditor } from "tock-vue-kit-editor";

  const chatTarget = ref<HTMLElement>();
  const displayEditor = ref<boolean>(false);

  onMounted(() => {
    renderChat(chatTarget.value!, "<Tock-connector-url>");

    setTimeout(() => {
      displayEditor.value = true;
    }, 100);
  });
</script>

<template>
  <div ref="chatTarget"></div>

  <aside class="editor" v-if="displayEditor">
    <TvkEditor></TvkEditor>
  </aside>
</template>

To ensure correct operation, make sure the Tock Vue kit is initialized before instantiating the editor.

0.0.13

6 months ago

0.0.12

7 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.8

9 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago