diff --git a/README.md b/README.md index 8c53736b..02e85865 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Vue component for rich content strings -[![npm last version](https://img.shields.io/npm/v/@juliushaertl/vue-richtext.svg?style=flat-square)](https://www.npmjs.com/package/@juliushaertl/vue-richtext) [![Dependabot status](https://img.shields.io/badge/Dependabot-enabled-brightgreen.svg?longCache=true&style=flat-square&logo=dependabot)](https://dependabot.com) +[![npm last version](https://img.shields.io/npm/v/@nextcloud/vue-richtext.svg?style=flat-square)](https://www.npmjs.com/package/@nextcloud/vue-richtext) [![Dependabot status](https://img.shields.io/badge/Dependabot-enabled-brightgreen.svg?longCache=true&style=flat-square&logo=dependabot)](https://dependabot.com) This library provides a simple vue component to render text with rich placeholder replacements. The parameters that are replaced can either be a string or an object that allows rendering any Vue component into the text. @@ -10,7 +10,22 @@ Markdown can be used for basic text formatting. ## Installation ```sh -npm install --save @juliushaertl/vue-richtext +npm install --save @nextcloud/vue-richtext +``` + +## Usage + +### Importing the vue component + +``` +import { RichText } from '@nextcloud/vue-richtext' +``` + +### Importing the shipped stylesheets + +``` +@import '@nextcloud/vue-richtext/dist/style.css'; + ``` ## Basic usage with simple text placeholders @@ -28,7 +43,7 @@ npm install --save @juliushaertl/vue-richtext + diff --git a/src/ReferenceWidget.vue b/src/ReferenceWidget.vue new file mode 100644 index 00000000..035a24bc --- /dev/null +++ b/src/ReferenceWidget.vue @@ -0,0 +1,190 @@ + + + diff --git a/src/RichText.vue b/src/RichText.vue index 7130e104..0cde19f6 100644 --- a/src/RichText.vue +++ b/src/RichText.vue @@ -23,6 +23,7 @@