Skip to content

Commit

Permalink
Merge pull request #4505 from nextcloud-libraries/backport/4485/stable7
Browse files Browse the repository at this point in the history
[stable7] feat(NcRichContenteditable) - add different output appearance in examples
  • Loading branch information
Pytal committed Sep 6, 2023
2 parents 26d74da + 28c0fca commit 0150e0c
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/components/NcRichContenteditable/NcRichContenteditable.vue
Expand Up @@ -47,16 +47,26 @@ This component displays contenteditable div with automated `@` [at] autocompleti
:user-data="userData"
placeholder="Try mentioning user @Test01 or inserting emoji :smile"
@submit="onSubmit" />
<br>
<br>

<h5>Output - raw</h5>
{{ JSON.stringify(message) }}

<h5>Output - preformatted</h5>
<p class="pre-line">{{ message }}</p>

<h5>Output - in NcRichText with markdown support</h5>
<NcRichText :text="message" use-markdown />
</div>
</template>
<script>
import NcRichText from "../NcRichText/NcRichText.vue";
export default {
components: {NcRichText},
data() {
return {
message: 'Lorem ipsum dolor sit amet.',
message: '**Lorem ipsum** dolor sit amet.',
// You need to provide this for the inline
// mention to understand what to display or not.
Expand Down Expand Up @@ -142,6 +152,16 @@ export default {
}
}
</script>
<style lang="scss" scoped>
h5 {
font-weight: bold;
margin: 40px 0 20px 0;
}
.pre-line {
white-space: pre-line;
}
</style>
```

</docs>
Expand Down

0 comments on commit 0150e0c

Please sign in to comment.