Skip to content
Merged

Next #61

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/config/image-upload-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: You can learn about the imageUploadUrl config in the documentation

When the property is set, RichText uploads each inserted image to the given endpoint and inserts the URL returned by the server.

When the property is omitted or set to a falsy value (`""`, `null`, `undefined`), RichText switches to **inline mode**: the image file is read on the client and embedded directly into the content as a base64 data URL no server is required. Inline images larger than 1024×800 are proportionally downscaled to fit within these limits.
When the property is omitted or set to a falsy value (`""`, `null`, `undefined`), RichText switches to **inline mode**: the image file is read on the client and embedded directly into the content as a base64 data URL, so no server is required. Inline images larger than 1024×800 are proportionally downscaled to fit within these limits.

:::note
Inline (base64) images are not preserved by the built-in DOCX / PDF [export](api/events/export.md). If you rely on export, supply an `imageUploadUrl` so that images reference an external location.
Expand Down Expand Up @@ -40,7 +40,7 @@ new richtext.Richtext("#root", {
});
~~~

Insert images inline as base64 (no server required) — omit the property or pass an empty string:
Insert images inline as base64 (no server required) by omitting the property or passing an empty string:

~~~jsx {2}
new richtext.Richtext("#root", {
Expand Down
2 changes: 1 addition & 1 deletion docs/api/config/trigger-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: You can learn about the triggerTemplate config in the documentation

@short: Optional. Customizes how RichText renders items in the suggestion dropdown opened by a [`triggers`](api/config/triggers.md) entry

By default, the dropdown shows each item's `label` as plain text. Use `triggerTemplate` to render richer rowsfor example, an avatar plus a name and an email.
By default, the dropdown shows each item's `label` as plain text. Use `triggerTemplate` to render richer rows, for example an avatar plus a name and an email.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/api/events/insert-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface IImageContext {
~~~

:::note
The `value` field holds either an external URL (when [`imageUploadUrl`](api/config/image-upload-url.md) is configured and the upload succeeds) or a base64 data URL (when `imageUploadUrl` is omitted and the image is inlined on the client). Handlers that process the sourcefor example, to rewrite the URL or validate the host must account for both formats.
The `value` field holds either an external URL (when [`imageUploadUrl`](api/config/image-upload-url.md) is configured and the upload succeeds) or a base64 data URL (when `imageUploadUrl` is omitted and the image is inlined on the client). Handlers that process the source, for example to rewrite the URL or validate the host, must account for both formats.
:::

:::info
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ new richtext.Richtext("#root", {
});
~~~

Inline images larger than 1024×800 are displayed at a reduced size (the `width`/`height` attributes are capped to fit within these limits), but the embedded bytes are the original, full-resolution file — the client does not downscale or re-encode it.
Inline images larger than 1024×800 are displayed at a reduced size (the `width`/`height` attributes are capped to fit within these limits), but the embedded bytes are the original, full-resolution file. The client does not downscale or re-encode it.

:::note
Inline (base64) images are not preserved by the built-in DOCX / PDF [export](api/events/export.md). If you rely on export, supply an `imageUploadUrl` so that images reference an external location.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/mentions_and_tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ new richtext.Richtext("#root", {

## Custom action on select

By default, picking an item inserts it into the document as a token. To run your own code instead, add an `action` callback to the trigger. RichText removes the typed trigger text and calls `action(item)` with the picked item — no token is inserted, so you can decide what to add.
By default, picking an item inserts it into the document as a token. To run your own code instead, add an `action` callback to the trigger. RichText removes the typed trigger text and calls `action(item)` with the picked item. No token is inserted, so you can decide what to add.

:::note
`action` takes priority over `showTrigger`. When `action` is set, `showTrigger` is ignored.
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/working_with_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ This guide explains:

## Default behavior: inline images

If you do not set the [`imageUploadUrl`](api/config/image-upload-url.md) property, RichText falls back to inline images. When the user inserts an image, RichText reads the file in the browser, encodes the original file as a `data:image/...;base64,...` URL, and writes it directly into the editor content as the `src` of the `<img>` element. RichText constrains the displayed size to fit within a 1024×800 box through the `width`/`height` attributes, but the embedded bytes are the original, full-resolution file — the client does not downscale or re-encode it.
If you do not set the [`imageUploadUrl`](api/config/image-upload-url.md) property, RichText falls back to inline images. When the user inserts an image, RichText reads the file in the browser, encodes the original file as a `data:image/...;base64,...` URL, and writes it directly into the editor content as the `src` of the `<img>` element. RichText constrains the displayed size to fit within a 1024×800 box through the `width`/`height` attributes, but the embedded bytes are the original, full-resolution file. The client does not downscale or re-encode it.

This works without any backend and is handy for quick demos, but it has clear limitations:

- the encoded bytes live inside the document, so the saved HTML grows with every image
- the same image in two documents is stored twice there is no shared resource to deduplicate
- the same image in two documents is stored twice, because there is no shared resource to deduplicate
- because the bytes are not a separate resource, the server cannot serve them from a CDN or post-process them (resize, re-encode, scan)
- inline images are not preserved by the built-in DOCX / PDF [export](api/events/export.md) if you rely on export, configure an upload server so images reference an external URL
- inline images are not preserved by the built-in DOCX / PDF [export](api/events/export.md), so if you rely on export, configure an upload server that lets images reference an external URL

## Write your own server

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const md = editor.getValue(richtext.markdown.toMarkdown);
~~~

:::note
Markdown support covers a limited subset of the syntax common block and inline elements such as headings, paragraphs, line breaks, emphasis, blockquotes, lists, and links. Formatting that has no Markdown equivalent (font family, font size, colors, alignment, line height) is dropped on serialization.
Markdown support covers a limited subset of the syntax: common block and inline elements such as headings, paragraphs, line breaks, emphasis, blockquotes, lists, and links. Formatting that has no Markdown equivalent (font family, font size, colors, alignment, line height) is dropped on serialization.

Nested inline structures are not supported, with the only exception of **bold inside italic**. Combinations such as bold inside a link, italic inside a list item, or multi-level (nested) lists will not render correctly.
:::
Expand All @@ -120,7 +120,7 @@ When content is copied or cut, RichText writes two representations to the system
Paste behavior depends on the source of the clipboard payload:

- Pasting between two RichText instances (in the same document or on different pages) uses the HTML representation and preserves the original formatting.
- Pasting from any external source — including browsers, word processors, and other editors is processed as plain text. The inserted content is added as text without external formatting.
- Pasting from any external source (browsers, word processors, and other editors) is processed as plain text. The inserted content is added as text without external formatting.

:::note
The toolbar **Paste** button uses the asynchronous Clipboard API, which exposes plain text only. To paste content copied from another RichText with its formatting preserved, use the `Ctrl+V` / `⌘+V` shortcut, which receives the full HTML payload directly from the browser's clipboard event.
Expand Down
2 changes: 1 addition & 1 deletion docs/news/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ editor.getValue(toTextEncoder);
```

:::note
You can still call `getValue()` and `setValue()` without an encoder HTML is used by default
You can still call `getValue()` and `setValue()` without an encoder. HTML is used by default
:::

### - [`on`](api/internal/on.md) / [`detach`](api/internal/detach.md)
Expand Down
2 changes: 1 addition & 1 deletion i18n/de/docusaurus-plugin-content-docs/current/.sync
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c5fee7e0d2c9c6fb0721c92dcafb264655069c38
05606c5dd334f327d352f06b9d57a0c5c6965b1e
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ new richtext.Richtext("#root", {
});
~~~

Inline-Bilder, die größer als 1024×800 sind, werden in reduzierter Größe angezeigt (die Attribute `width`/`height` werden auf diese Grenzen begrenzt), aber die eingebetteten Bytes sind die ursprüngliche Datei in voller Auflösung — der Client skaliert sie nicht herunter oder kodiert sie neu.
Inline-Bilder, die größer als 1024×800 sind, werden in reduzierter Größe angezeigt (die Attribute `width`/`height` werden auf diese Grenzen begrenzt), aber die eingebetteten Bytes sind die ursprüngliche Datei in voller Auflösung. Der Client skaliert sie nicht herunter und kodiert sie nicht neu.

:::note[Hinweis]
Inline-Bilder (Base64) bleiben beim integrierten DOCX-/PDF-[Export](api/events/export.md) nicht erhalten. Wenn Sie auf den Export angewiesen sind, geben Sie eine `imageUploadUrl` an, damit Bilder auf einen externen Speicherort verweisen.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Der MCP-Server versorgt KI-Assistenten mit verifizierter, aktueller

# DHTMLX RichText MCP-Server: Formate, Symbolleiste und Trigger {#dhtmlx-richtext-mcp-server-formats-toolbar-and-triggers}

DHTMLX RichText ist ein leichtgewichtiger WYSIWYG-Editor mit einer breiten Konfigurationsfläche. Sie können Inhalte zwischen [HTML, Klartext und Markdown](/#supported-formats) konvertieren, die Typografie pro Blocktyp über [Standardstile](guides/configuration.md#configure-default-styles) festlegen und eine vollständig anpassbare [Symbolleiste](guides/configuration.md#toolbar) erstellen, die sich an die Steuerelemente anpasst, die eine Anwendung benötigt. Um daraus den vollen Nutzen zu ziehen, müssen Sie jedes Element mit dem aktuellen Setup abgleichen: aktuelles CSS für Standardstile, den richtigen Encoder für ein bestimmtes Format und gültige Steuerelementtypen für benutzerdefinierte Symbolleisten-Schaltflächen statt sich auf eine auswendig gelernte Vermutung zu verlassen.
DHTMLX RichText ist ein leichtgewichtiger WYSIWYG-Editor mit einer breiten Konfigurationsfläche. Sie können Inhalte zwischen [HTML, Klartext und Markdown](/#supported-formats) konvertieren, die Typografie pro Blocktyp über [Standardstile](guides/configuration.md#configure-default-styles) festlegen und eine vollständig anpassbare [Symbolleiste](guides/configuration.md#toolbar) erstellen, die sich an die Steuerelemente anpasst, die eine Anwendung benötigt. Um daraus den vollen Nutzen zu ziehen, müssen Sie jedes Element mit dem aktuellen Setup abgleichen: aktuelles CSS für Standardstile, den richtigen Encoder für ein bestimmtes Format und gültige Steuerelementtypen für benutzerdefinierte Symbolleisten-Schaltflächen, statt sich auf eine auswendig gelernte Vermutung zu verlassen.

Der DHTMLX MCP-Server hält einen KI-Assistenten in all diesen Punkten auf dem aktuellen Stand. Das [Setup für Erwähnungen und Trigger](guides/mentions_and_tags.md), der [Vertrag für den Bild-Upload](guides/working_with_server.md) und der [DOCX-/PDF-Exportablauf](api/events/export.md) stammen alle aus der aktuellen Dokumentation, sodass generierter Code dem tatsächlichen Verhalten des Editors von heute entspricht.

Expand Down Expand Up @@ -51,7 +51,7 @@ Dank dieses Ablaufs bleiben die Formatierungs- und Symbolleisten-Vorschläge fü

## KI-Tool mit dem MCP-Server verbinden {#attaching-your-ai-tool-to-the-mcp-server}

Die Registrierung des MCP-Endpunkts muss pro Tool nur einmal erfolgenegal ob per CLI-Befehl oder JSON-Konfigurationseintrag und alle zielen auf dieselbe Adresse:
Die Registrierung des MCP-Endpunkts muss pro Tool nur einmal erfolgen, egal ob per CLI-Befehl oder JSON-Konfigurationseintrag, und alle zielen auf dieselbe Adresse:

~~~jsx
https://docs.dhtmlx.com/mcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ new richtext.Richtext("#root", {

## Benutzerdefinierte Aktion bei Auswahl {#custom-action-on-select}

Standardmäßig wird ein ausgewähltes Element als Token in das Dokument eingefügt. Um stattdessen eigenen Code auszuführen, fügen Sie dem Trigger einen `action`-Callback hinzu. RichText entfernt den eingegebenen Trigger-Text und ruft `action(item)` mit dem ausgewählten Element auf — es wird kein Token eingefügt, sodass Sie selbst entscheiden können, was hinzugefügt wird.
Standardmäßig wird ein ausgewähltes Element als Token in das Dokument eingefügt. Um stattdessen eigenen Code auszuführen, fügen Sie dem Trigger einen `action`-Callback hinzu. RichText entfernt den eingegebenen Trigger-Text und ruft `action(item)` mit dem ausgewählten Element auf. Es wird kein Token eingefügt, sodass Sie selbst entscheiden können, was hinzugefügt wird.

:::note[Hinweis]
`action` hat Vorrang vor `showTrigger`. Wenn `action` gesetzt ist, wird `showTrigger` ignoriert.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Dieser Guide erklärt:

## Standardverhalten: Inline-Bilder {#default-behavior-inline-images}

Wenn Sie die Eigenschaft [`imageUploadUrl`](api/config/image-upload-url.md) nicht setzen, fällt RichText auf Inline-Bilder zurück. Wenn der Benutzer ein Bild einfügt, liest RichText die Datei im Browser, kodiert die Originaldatei als `data:image/...;base64,...`-URL und schreibt diese direkt als `src` des `<img>`-Elements in den Editor-Inhalt. RichText begrenzt die angezeigte Größe über die Attribute `width`/`height` auf einen 1024×800-Bereich, aber die eingebetteten Bytes sind die originale Datei in voller Auflösung — der Client skaliert oder kodiert sie nicht um.
Wenn Sie die Eigenschaft [`imageUploadUrl`](api/config/image-upload-url.md) nicht setzen, fällt RichText auf Inline-Bilder zurück. Wenn der Benutzer ein Bild einfügt, liest RichText die Datei im Browser, kodiert die Originaldatei als `data:image/...;base64,...`-URL und schreibt diese direkt als `src` des `<img>`-Elements in den Editor-Inhalt. RichText begrenzt die angezeigte Größe über die Attribute `width`/`height` auf einen 1024×800-Bereich, aber die eingebetteten Bytes sind die originale Datei in voller Auflösung. Der Client skaliert sie nicht herunter und kodiert sie nicht um.

Dies funktioniert ohne jedes Backend und ist praktisch für schnelle Demos, hat aber klare Einschränkungen:

- die kodierten Bytes leben im Dokument, daher wächst das gespeicherte HTML mit jedem Bild
- dasselbe Bild in zwei Dokumenten wird zweimal gespeichert es gibt keine gemeinsame Ressource zur Deduplizierung
- dasselbe Bild in zwei Dokumenten wird zweimal gespeichert, da es keine gemeinsame Ressource zur Deduplizierung gibt
- da die Bytes keine separate Ressource sind, kann der Server sie weder über ein CDN ausliefern noch nachbearbeiten (skalieren, umkodieren, scannen)
- Inline-Bilder werden durch den integrierten DOCX/PDF-[Export](api/events/export.md) nicht erhalten — wenn Sie auf den Export angewiesen sind, konfigurieren Sie einen Upload-Server, damit Bilder auf eine externe URL verweisen
- Inline-Bilder werden durch den integrierten DOCX/PDF-[Export](api/events/export.md) nicht erhalten, sodass Sie bei Nutzung des Exports einen Upload-Server konfigurieren sollten, damit Bilder auf eine externe URL verweisen

## Eigenen Server schreiben {#write-your-own-server}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ editor.getValue(toTextEncoder);
```

:::note[Hinweis]
Sie können `getValue()` und `setValue()` weiterhin ohne Encoder aufrufen HTML wird standardmäßig verwendet
Sie können `getValue()` und `setValue()` weiterhin ohne Encoder aufrufen. HTML wird standardmäßig verwendet
:::

### - [`on`](api/internal/on.md) / [`detach`](api/internal/detach.md) {#--on--detach}
Expand Down
2 changes: 1 addition & 1 deletion i18n/ko/docusaurus-plugin-content-docs/current/.sync
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c5fee7e0d2c9c6fb0721c92dcafb264655069c38
05606c5dd334f327d352f06b9d57a0c5c6965b1e
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ new richtext.Richtext("#root", {
});
~~~

이미지를 base64로 인라인 삽입 (서버 불필요) 속성을 생략하거나 빈 문자열을 전달합니다:
이미지를 base64로 인라인 삽입하려면(서버 불필요) 속성을 생략하거나 빈 문자열을 전달합니다:

~~~jsx {2}
new richtext.Richtext("#root", {
Expand Down
2 changes: 1 addition & 1 deletion i18n/ko/docusaurus-plugin-content-docs/current/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const md = editor.getValue(richtext.markdown.toMarkdown);
~~~

:::note[노트]
Markdown 지원은 구문의 제한된 하위 집합만을 포함합니다 제목, 단락, 줄바꿈, 강조, 인용구, 목록, 링크와 같은 일반적인 블록 및 인라인 요소가 해당됩니다. Markdown에 해당하는 표현이 없는 서식(글꼴 패밀리, 글꼴 크기, 색상, 정렬, 줄 높이)은 직렬화 시 제거됩니다.
Markdown 지원은 구문의 제한된 하위 집합만을 포함합니다. 제목, 단락, 줄바꿈, 강조, 인용구, 목록, 링크와 같은 일반적인 블록 및 인라인 요소가 해당됩니다. Markdown에 해당하는 표현이 없는 서식(글꼴 패밀리, 글꼴 크기, 색상, 정렬, 줄 높이)은 직렬화 시 제거됩니다.

중첩 인라인 구조는 지원되지 않으며, **이탤릭체 안의 굵게**만 예외입니다. 링크 안의 굵게, 목록 항목 안의 이탤릭체, 또는 다단계(중첩) 목록과 같은 조합은 올바르게 렌더링되지 않습니다.
:::
Expand Down
2 changes: 1 addition & 1 deletion i18n/ru/docusaurus-plugin-content-docs/current/.sync
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c5fee7e0d2c9c6fb0721c92dcafb264655069c38
05606c5dd334f327d352f06b9d57a0c5c6965b1e
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: В документации DHTMLX JavaScript RichText вы мож

Если свойство задано, RichText загружает каждое вставленное изображение на указанный эндпоинт и подставляет URL, возвращённый сервером.

Если свойство не указано или имеет ложное значение (`""`, `null`, `undefined`), RichText переходит в **режим inline**: файл изображения читается на клиенте и встраивается непосредственно в содержимое в виде data URL в формате base64 сервер не требуется. Встроенные изображения размером более 1024×800 пропорционально уменьшаются до этих пределов.
Если свойство не указано или имеет ложное значение (`""`, `null`, `undefined`), RichText переходит в **режим inline**: файл изображения читается на клиенте и встраивается непосредственно в содержимое в виде data URL в формате base64, поэтому сервер не требуется. Встроенные изображения размером более 1024×800 пропорционально уменьшаются до этих пределов.

:::note[Примечание]
Встроенные (base64) изображения не сохраняются при встроенном [экспорте](api/events/export.md) в DOCX / PDF. Если вы используете экспорт, укажите `imageUploadUrl`, чтобы изображения ссылались на внешнее расположение.
Expand Down Expand Up @@ -40,7 +40,7 @@ new richtext.Richtext("#root", {
});
~~~

Вставка изображений inline в виде base64 (сервер не требуется) не указывайте свойство или передайте пустую строку:
Чтобы вставлять изображения inline в виде base64 (сервер не требуется), не указывайте свойство или передайте пустую строку:

~~~jsx {2}
new richtext.Richtext("#root", {
Expand Down
Loading
Loading