refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)

This commit is contained in:
Alex Grozav
2025-02-28 14:28:30 +02:00
committed by GitHub
parent 684353436d
commit f5743176e5
1635 changed files with 805 additions and 1079 deletions

View File

@@ -0,0 +1,43 @@
<script lang="ts">
import sanitizeHtml, { defaults, type IOptions as SanitizeOptions } from 'sanitize-html';
const sanitizeOptions: SanitizeOptions = {
allowVulnerableTags: false,
enforceHtmlBoundary: false,
disallowedTagsMode: 'discard',
allowedTags: [...defaults.allowedTags, 'style', 'img', 'title'],
allowedAttributes: {
...defaults.allowedAttributes,
'*': ['class', 'style'],
},
transformTags: {
head: '',
},
};
export default {
name: 'RunDataHtml',
props: {
inputHtml: {
type: String,
required: true,
},
},
computed: {
sanitizedHtml() {
return sanitizeHtml(this.inputHtml, sanitizeOptions);
},
},
};
</script>
<template>
<iframe class="__html-display" :srcdoc="sanitizedHtml" />
</template>
<style lang="scss">
.__html-display {
width: 100%;
height: 100%;
}
</style>