diff --git a/apps/desktop/src/components/grid/DataGridValueTransform.vue b/apps/desktop/src/components/grid/DataGridValueTransform.vue index 0c5f0ea472..a4b5650295 100644 --- a/apps/desktop/src/components/grid/DataGridValueTransform.vue +++ b/apps/desktop/src/components/grid/DataGridValueTransform.vue @@ -7,6 +7,7 @@ import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; import { CELL_TRANSFORM_KINDS, CELL_TRANSFORM_MAX_INPUT, CELL_TRANSFORM_MAX_OUTPUT, CELL_TRANSFORM_MAX_RADIX_DIGITS, transformCellValue, type CellTransformKind, type CellTransformResult } from "@/lib/dataGrid/cellValueTransform"; import { DataGridDateTimePatterns, getSupportedTimeZoneOptions } from "@/lib/dataGrid/columnFormatter"; +import { buildSafeHtmlPreview } from "@/lib/common/safeHtmlPreview"; const props = defineProps<{ source: string | null; @@ -81,6 +82,8 @@ function convert() { if (blockedReason.value || props.source === null) return; result.value = transformCellValue(props.source, { kind: kind.value, unit: unit.value, timezone: timezone.value, pattern: pattern.value, fromBase: fromBase.value, toBase: toBase.value }); } +const htmlPreviewDocument = computed(() => (kind.value === "html" && result.value?.ok ? buildSafeHtmlPreview(result.value.text) : "")); + async function copyResult() { if (!result.value?.ok) return; try { @@ -155,6 +158,7 @@ async function copyResult() { > +