Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable7] feat(NcRichContenteditable) - add different output appearance in examples #4505

Merged
merged 1 commit into from Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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