Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
778f6e9
[update] RichText 2.0
serhiipylypchuk1991 Jun 1, 2025
aba23eb
[dev] refactoring
serhiipylypchuk1991 Jun 6, 2025
88b3de8
Add properties description
serhiipylypchuk1991 Jul 8, 2025
1bf2916
Add basic methods description
serhiipylypchuk1991 Jul 14, 2025
dea2f9e
Update configs
serhiipylypchuk1991 Jul 18, 2025
0875364
Update methods
serhiipylypchuk1991 Jul 18, 2025
7af7071
Update internal methods
serhiipylypchuk1991 Jul 18, 2025
8b3e514
Update internal methods
serhiipylypchuk1991 Jul 19, 2025
b573291
Add minor fixes
serhiipylypchuk1991 Jul 19, 2025
403e3a6
[update] events description
serhiipylypchuk1991 Jul 21, 2025
b7d727a
[update] minor fixes
serhiipylypchuk1991 Jul 21, 2025
727cb94
[add] screenshots for guides
serhiipylypchuk1991 Jul 21, 2025
b5ab5f2
[update] react, angular, vue guides
serhiipylypchuk1991 Jul 21, 2025
eca2cda
[update] how to start and overview guides
serhiipylypchuk1991 Jul 21, 2025
8580bbc
[update] svelte integration guide
serhiipylypchuk1991 Jul 21, 2025
9cadff4
[update] initialization guide + sidebar
serhiipylypchuk1991 Jul 21, 2025
9ba8e4e
[add] TypeScript document
serhiipylypchuk1991 Jul 21, 2025
49ca2ea
[update] link events
serhiipylypchuk1991 Jul 21, 2025
b291b29
[add] show popup
serhiipylypchuk1991 Jul 21, 2025
293b304
[update] screenshots
serhiipylypchuk1991 Jul 22, 2025
2b8eb42
[update] fullscreen mode
serhiipylypchuk1991 Jul 22, 2025
e87ed57
[update] minor style changes
serhiipylypchuk1991 Jul 22, 2025
a2144e3
[update] config and methods
serhiipylypchuk1991 Jul 23, 2025
642ac26
[update] localization
serhiipylypchuk1991 Jul 23, 2025
6a2caf2
[update] wn and migration
serhiipylypchuk1991 Jul 23, 2025
91deb5f
[update] minor changes
serhiipylypchuk1991 Jul 23, 2025
f0c26fe
[update] migration links
serhiipylypchuk1991 Jul 23, 2025
a4f3209
[update] links
serhiipylypchuk1991 Jul 23, 2025
40eee13
[update] minor changes
serhiipylypchuk1991 Jul 24, 2025
ccff048
[update] wn and minor fixes
serhiipylypchuk1991 Jul 24, 2025
fe53831
[update] minor fixes
serhiipylypchuk1991 Jul 24, 2025
6e0f7b8
[update] minor fixes
serhiipylypchuk1991 Jul 24, 2025
0d1d113
[update] wn (new style and extended description)
serhiipylypchuk1991 Jul 24, 2025
f453269
[update] wn and screenshots
serhiipylypchuk1991 Jul 24, 2025
ecda638
[text] migration
serhiipylypchuk1991 Jul 24, 2025
929b14c
[update] shortcuts
serhiipylypchuk1991 Jul 24, 2025
5316a2c
[update] migration
serhiipylypchuk1991 Jul 25, 2025
50fa416
[update] minor changes after review (developer)
serhiipylypchuk1991 Jul 25, 2025
41055e3
[update] typos
serhiipylypchuk1991 Jul 25, 2025
b640ca7
[update] Whats new and migration
serhiipylypchuk1991 Jul 26, 2025
9d09b77
[update] deprecated - removed
serhiipylypchuk1991 Jul 26, 2025
52593c5
[add] overview pages
serhiipylypchuk1991 Jul 26, 2025
547e1bd
[update] add stylisation guides
serhiipylypchuk1991 Jul 28, 2025
751e132
[update] minor fixes
serhiipylypchuk1991 Jul 29, 2025
7330386
[update] minor changes after review
serhiipylypchuk1991 Jul 30, 2025
2cc3816
Update Integration duides
serhiipylypchuk1991 Jul 30, 2025
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
144 changes: 144 additions & 0 deletions docs/api/config/default-styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
---
sidebar_label: defaultStyles
title: defaultStyles Config
description: You can learn about the defaultStyles config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# defaultStyles

### Description

@short: Optional. Specifies default style values for specific block types

### Usage

~~~jsx {}
defaultStyles?: {
"*"?: { // affects all blocks, allowing you to set common properties for all of these blocks
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
p?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
blockquote?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h1?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h2?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h3?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h4?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h5?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
},
h6?: {
"font-family"?: string; // "Roboto"| "Arial" | "Georgia" | "Tahoma" | "Times New Roman" | "Verdana"
"font-size"?: string; // "12px" | "14px" | "16px" | "18px" | "20px" | "24px" | "28px" | "32px" | "36px"
color?: string;
background?: string;
}
};
~~~

:::important
The `defaultStyles` property DOES NOT set the actual CSS to the affected blocks. CSS styles have to be applied separately:

```jsx title="index.js"
new richtext.Richtext("#root", {
defaultStyles: {
h2: {
"font-family": "Roboto",
"font-size": "28px",
color: "purple",
background: "#FFC0CB"
}
}
});
```

```css title="index.css"
<style>
#root h2 {
font-family: Roboto;
font-size: 28px;
color: purple;
background: #FFC0CB;
}
</style>
```

In this example, all `h2` blocks are assigned to the `"Roboto"` font-family with a font-size of 28px with both the foreground and the background colors changed as well. Css styles assigned to `h2` blocks as well.
:::

### Default config

~~~jsx
const defaultStyles = {
"*": { "font-family": "Arial" },
p: { "font-size": "14px" },
blockquote: { "font-size": "14px" },
h1: { "font-size": "32px" },
h2: { "font-size": "24px" },
h3: { "font-size": "18px" },
h4: { "font-size": "16px" },
h5: { "font-size": "14px" },
h6: { "font-size": "12px" }
};
~~~

### Example

~~~jsx {3-13}
// initialize RichText
new richtext.Richtext("#root", {
defaultStyles: {
h4: {
"font-family": "Roboto"
},
h5: {
"font-family": "Roboto"
},
h6: {
"font-family": "Roboto"
}
},
// other configuration properties
});
~~~

**Change log:** The property was updated in v2.0

**Related articles:** [Configuration](guides/configuration.md)

**Related sample:** [RichText. Changing the default value for typography (font, font size, etc.)](https://snippet.dhtmlx.com/6u3ti01s)
39 changes: 39 additions & 0 deletions docs/api/config/fullscreen-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_label: fullscreenMode
title: fullscreenMode Config
description: You can learn about the fullscreenMode config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# fullscreenMode

### Description

@short: Optional. Enables the RichText fullscreen mode

### Usage

~~~jsx {}
fullscreenMode?: boolean;
~~~

### Default config

~~~jsx
fullscreenMode: false;
~~~

### Example

~~~jsx {3}
// initialize RichText
new richtext.Richtext("#root", {
fullscreenMode: true
// other configuration properties
});
~~~

**Change log:** The property was added in v2.0

**Related articles:** [Configuration](guides/configuration.md)

**Related sample:** [RichText. Full toolbar](https://snippet.dhtmlx.com/ziynafp7)
33 changes: 33 additions & 0 deletions docs/api/config/image-upload-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
sidebar_label: imageUploadUrl
title: imageUploadUrl Config
description: You can learn about the imageUploadUrl config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# imageUploadUrl

### Description

@short: Optional. Specifies the URL which will be used for image upload

### Usage

~~~jsx {}
imageUploadUrl?: string;
~~~

### Example

~~~jsx {3}
// initialize RichText
new richtext.Richtext("#root", {
imageUploadUrl: "some URL"
// other configuration properties
});
~~~

**Change log:** The property was added in v2.0

**Related articles:** [Configuration](guides/configuration.md)

**Related sample:** [RichText. Initialization](https://snippet.dhtmlx.com/t55alxiy)
41 changes: 41 additions & 0 deletions docs/api/config/layout-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_label: layoutMode
title: layoutMode Config
description: You can learn about the layoutMode config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# layoutMode

### Description

@short: Optional. Specifies the layout mode for the main editor area

### Usage

~~~jsx {}
layoutMode: "classic" | "document";
~~~

The `"classic"` mode represents the edit area that fits the entire page. The `"document"` mode closely represent the real document sizes (sizes used: A4, A5, A6, A7).

### Default config

~~~jsx
layoutMode: "classic";
~~~

### Example

~~~jsx {3}
// initialize RichText
new richtext.Richtext("#root", {
layoutMode: "document" // initializes RichText with "document" mode by default
// other configuration properties
});
~~~

**Change log:** The property was added in v2.0 instead of the removed `mode` property

**Related articles:** [Configuration](guides/configuration.md)

**Related sample:** [RichText. Initialization](https://snippet.dhtmlx.com/t55alxiy)
47 changes: 47 additions & 0 deletions docs/api/config/locale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_label: locale
title: locale Config
description: You can learn about the locale config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# locale

### Description

@short: Optional. An object that includes localization labels of RichText

:::info
The **locale** object needs to include all labels of RichText with the corresponding translations.
:::

### Usage

~~~jsx {}
locale?: object;
~~~

### Default config

By default, RichText uses the **English** locale. You can set it to the custom locale as well.

:::tip
To change the current locale dynamically, you can use the [**setLocale()**](api/methods/set-locale.md) method of RichText
:::

### Example

~~~jsx {3}
// initialize RichText
const editor = new richtext.RichText("#root", {
locale: richtext.locales.cn // the Chineese locale will be set initially
// locale: richtext.locales.en // the English locale will be set initially
// locale: richtext.locales.de // the Germany locale will be set initially
// other configuration properties
});
~~~

**Change log:** The property was added in v2.0

**Related articles:** [Localization](guides/localization.md)

**Related sample:** [RichText. Localization](https://snippet.dhtmlx.com/zxjrin3i)
33 changes: 33 additions & 0 deletions docs/api/config/menubar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
sidebar_label: menubar
title: menubar Config
description: You can learn about the menubar config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.
---

# menubar

### Description

@short: Optional. Enables the top menubar of RichText

### Usage

~~~jsx {}
menubar?: boolean;
~~~

### Example

~~~jsx {3}
// initialize RichText
new richtext.Richtext("#root", {
menubar: true
// other configuration properties
});
~~~

**Change log:** The property was added in v2.0

**Related articles:** [Configuration](guides/configuration.md)

**Related sample:** [RichText. Initialization with menubar](https://snippet.dhtmlx.com/tjryzka7)
Loading
Loading