👉🏻 A Vue 3 component library based on Material Design 2 and 3, supporting mobile and desktop.
💡 Vue Tip: Display Raw HTML
The double mustaches interpret the data as plain text, not HTML.
To output real HTML, you will need to use the v-htmlv-html directive:
1<script setup lang="ts">2const rawHtml = '<span style="color: red">This should be red.</span>';3</script>45<template>6 <p v-html="rawHtml" />7</template>
The contents of the spanspan will be interpreted as plain HTML, and all data bindings are ignored.
Vue is not a string-based templating engine, so we cannot use it to compose template partials with v-htmlv-html. Instead, components are favored as the fundamental unit for UI reuse and repurposing.
Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to XSS vulnerabilities. Only use v-htmlv-html on trusted content and never on user-provided content.
If you are looking for a safe replacement for v-htmlv-html, you can use the vue-dompurify-html
👉🏻 This tool automatically cleans up TypeScript code by removing unused exports, deleting modules with no referenced exports, and reporting these changes without making modifications in check mode.
😂 Fun
🔗 Want more Vue & Nuxt content?
More Exclusive Vue Tips: Join Michael Thiessen's newsletter and get great Vue tips and insights delivered to your inbox each week.
Weekly Vue & Nuxt Videos: You must subscribe Alexander Lichter's YouTube channel if you are interested in Vue & Nuxt.
DejaVue Podcast: A weekly podcast about Vue.js and the ecosystem around it.
Comments? Join the discussion about this issue in our Discord community.
Sunday, January 5, 2025 Update: Bluesky images work again and thus the Great Art on Bluesky channel is back. If you're on Bluesky please subscribe. # The crazy thing about Bluesky's API is they took already standardized things like links and enclosures, and after 20+ years came up with new definitions. Makes our apps more expensive to maintain, and we waste time and human wear and tear on stupid bullshit make-work. Developers are people, and our work is already horribly overly complex, we're working at the edge of comprehension, and what the fukc let's throw some more unnecessary complication into the mix. Arrogance, narcissism, whatever the source is, it's not a good way to introduce yourself. And, even better, after you go through the maze they break it, with an error message about legacy blob bullshit. They've already done this, and they're just getting started. It's why I say they should just adapt to RSS instead of trying to forc...
评论
发表评论