<template>
  <div class="rich-text"></div>
</template>

<script>
import { renderRichText } from "./renderJSON";

export default {
  name: "RichText",
  props: {
    textJson: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {};
  },
  watch: {
    textJson(val) {
      renderRichText(val, this.$el);
    },
  },
  mounted() {
    renderRichText(this.textJson, this.$el);
  },
  methods: {},
};
</script>
