mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 15:25:29 +00:00
refac: rich text input behaviour
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
This commit is contained in:
parent
5ed5e532a9
commit
c567185cb1
10
src/app.css
10
src/app.css
@ -231,6 +231,16 @@ input[type='number'] {
|
|||||||
@apply dark:bg-gray-800 bg-gray-100;
|
@apply dark:bg-gray-800 bg-gray-100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tiptap p code {
|
||||||
|
color: #eb5757;
|
||||||
|
border-width: 0px;
|
||||||
|
padding: 3px 8px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-weight: 600;
|
||||||
|
@apply rounded-md dark:bg-gray-800 bg-gray-100 mx-0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* Code styling */
|
/* Code styling */
|
||||||
.hljs-comment,
|
.hljs-comment,
|
||||||
.hljs-quote {
|
.hljs-quote {
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
import TurndownService from 'turndown';
|
import TurndownService from 'turndown';
|
||||||
const turndownService = new TurndownService();
|
const turndownService = new TurndownService({
|
||||||
|
codeBlockStyle: 'fenced'
|
||||||
|
});
|
||||||
|
turndownService.escape = (string) => string;
|
||||||
|
|
||||||
import { onMount, onDestroy } from 'svelte';
|
import { onMount, onDestroy } from 'svelte';
|
||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
@ -154,7 +157,7 @@
|
|||||||
|
|
||||||
const newValue = turndownService.turndown(editor.getHTML());
|
const newValue = turndownService.turndown(editor.getHTML());
|
||||||
if (value !== newValue) {
|
if (value !== newValue) {
|
||||||
value = newValue; // Trigger parent updates
|
value = newValue;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editorProps: {
|
editorProps: {
|
||||||
|
Loading…
Reference in New Issue
Block a user