refac: rich text input

This commit is contained in:
Timothy Jaeryang Baek
2024-11-20 22:46:51 -08:00
parent 9b03b1a453
commit e30c5e628c
5 changed files with 1072 additions and 486 deletions

View File

@@ -199,19 +199,34 @@ input[type='number'] {
}
.ProseMirror {
@apply h-full min-h-fit max-h-full whitespace-pre-wrap;
@apply h-full min-h-fit max-h-full whitespace-pre-wrap;
}
.ProseMirror:focus {
outline: none;
}
.placeholder::after {
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
cursor: text;
pointer-events: none;
float: left;
@apply absolute inset-0 z-0 text-gray-500;
color: #adb5bd;
pointer-events: none;
height: 0;
}
.tiptap > pre > code {
border-radius: 0.4rem;
font-size: 0.85rem;
padding: 0.25em 0.3em;
@apply dark:bg-gray-800 bg-gray-100;
}
.tiptap > pre {
border-radius: 0.5rem;
font-family: 'JetBrainsMono', monospace;
margin: 1.5rem 0;
padding: 0.75rem 1rem;
@apply dark:bg-gray-800 bg-gray-100;
}