We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b880c0 commit 8680c6bCopy full SHA for 8680c6b
src/lib/css/tiptap.css
@@ -98,6 +98,10 @@
98
@apply text-2xl font-bold text-white;
99
}
100
101
+.tiptap-editor-content pre {
102
+ @apply bg-gray-700 text-gray-200;
103
+}
104
+
105
@keyframes fadeIn {
106
from {
107
opacity: 0;
src/lib/utils/html.ts
@@ -3,8 +3,27 @@ export const textSanitizing = (rawHTML: string): string => {
3
return sanitize(rawHTML, {
4
sanitizeHtml: {
5
allowedAttributes: {
6
- target: ['_blank'],
+ img: ['src', 'alt'],
7
},
8
+ allowedTags: [
9
+ 'p',
10
+ 'h1',
11
+ 'h2',
12
+ 'h3',
13
+ 'h4',
14
+ 'h5',
15
+ 'h6',
16
+ 'strong',
17
+ 'em',
18
+ 's',
19
+ 'ul',
20
+ 'ol',
21
+ 'li',
22
+ 'br',
23
+ 'img',
24
+ 'pre',
25
+ 'code',
26
+ ],
27
28
})
29
0 commit comments