@caisy/rich-text-vue-renderer

0.3.0 • Public • Published

Vue.js Rich Text Renderer

For Vue.js, we wrote a helper library that makes the integration process of rich texts from Caisy as easy as possible.

Installation

To install, use npm or another package manager:

npm install @caisy/rich-text-vue-renderer --save

Usage

For ease of use, just pass the JSON and the component will convert it to HTML:

<template>
  <div v-if="data?.text && data?.text?.json">
    <RichTextRenderer :node="data.text.json" />
  </div>
</template>

<script>
import { RichTextRenderer } from "@caisy/rich-text-vue-renderer";
...
</script>

Correct Object Structure

To ensure that you pass the correct object, it should contain something like this:

{ type: "doc", ... }

Example Codepen/Stackblitz

An example using the rich text render with Vue.js and Nuxt can also be found here on Stackblitz: https://stackblitz.com/github/caisy-io/caisy-example-nuxt

Readme

Keywords

none

Package Sidebar

Install

npm i @caisy/rich-text-vue-renderer

Weekly Downloads

9

Version

0.3.0

License

none

Unpacked Size

17.6 kB

Total Files

4

Last publish

Collaborators

  • m.gruber