Skip to content
Open
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions docs/api/config/default-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description: You can learn about the defaultStyles config in the documentation o

# defaultStyles

### Description
### Description {#description}

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

### Usage
### Usage {#usage}

~~~jsx {}
defaultStyles?: {
Expand Down Expand Up @@ -101,7 +101,7 @@ new richtext.Richtext("#root", {
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
### Default config {#default-config}

~~~jsx
const defaultStyles = {
Expand All @@ -117,7 +117,7 @@ const defaultStyles = {
};
~~~

### Example
### Example {#example}

~~~jsx {3-13}
// initialize RichText
Expand Down
8 changes: 4 additions & 4 deletions docs/api/config/fullscreen-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ description: You can learn about the fullscreenMode config in the documentation

# fullscreenMode

### Description
### Description {#description}

@short: Optional. Enables the RichText fullscreen mode

### Usage
### Usage {#usage}

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

### Default config
### Default config {#default-config}

~~~jsx
fullscreenMode: false;
~~~

### Example
### Example {#example}

~~~jsx {3}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/config/image-upload-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ description: You can learn about the imageUploadUrl config in the documentation

# imageUploadUrl

### Description
### Description {#description}

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

### Usage
### Usage {#usage}

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

### Example
### Example {#example}

~~~jsx {3}
// initialize RichText
Expand Down
8 changes: 4 additions & 4 deletions docs/api/config/layout-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ description: You can learn about the layoutMode config in the documentation of t

# layoutMode

### Description
### Description {#description}

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

### Usage
### Usage {#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
### Default config {#default-config}

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

### Example
### Example {#example}

~~~jsx {3}
// initialize RichText
Expand Down
8 changes: 4 additions & 4 deletions docs/api/config/locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ description: You can learn about the locale config in the documentation of the D

# locale

### Description
### Description {#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
### Usage {#usage}

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

### Default config
### Default config {#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
### Example {#example}

~~~jsx {3}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/config/menubar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ description: You can learn about the menubar config in the documentation of the

# menubar

### Description
### Description {#description}

@short: Optional. Enables the top menubar of RichText

### Usage
### Usage {#usage}

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

### Example
### Example {#example}

~~~jsx {3}
// initialize RichText
Expand Down
14 changes: 7 additions & 7 deletions docs/api/config/toolbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ description: You can learn about the toolbar config in the documentation of the

# toolbar

### Description
### Description {#description}

@short: Optional. Enables toolbar and allows users to specify/configure buttons displayed within toolbar

### Usage
### Usage {#usage}

~~~jsx {}
toolbar?: boolean | Array<string | { id: string, type: string, label?: string, tooltip?: string, css?: string, handler?: () => any }>;
~~~

#### Available buttons within Toolbar
#### Available buttons within Toolbar {#available-buttons-within-toolbar}

You can specify the following buttons in the RichText toolbar:

Expand Down Expand Up @@ -66,7 +66,7 @@ new richtext.Richtext("#root", {
});
~~~

#### Custom buttons within Toolbar
#### Custom buttons within Toolbar {#custom-buttons-within-toolbar}

You can specify custom buttons as objects with the following parameters:

Expand Down Expand Up @@ -115,7 +115,7 @@ new richtext.Richtext("#root", {
});
~~~

#### Hide Toolbar
#### Hide Toolbar {#hide-toolbar}

If you need to hide toolbar, set the `toolbar` property to `false` as follows:

Expand All @@ -126,7 +126,7 @@ new richtext.Richtext("#root", {
});
~~~

### Default config
### Default config {#default-config}

~~~jsx
const defaultToolbarButtons = {
Expand Down Expand Up @@ -187,7 +187,7 @@ new richtext.Richtext("#root", {
```
:::

### Example
### Example {#example}

~~~jsx {3-18}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/config/value.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ description: You can learn about the value config in the documentation of the DH

# value

### Description
### Description {#description}

@short: Optional. Specifies the initial value (content) displayed within the editor area of RichText

:::tip
If you want to set the value (content) using custom format, use the built-in [`setValue()`](api/methods/set-value.md) method.
:::

### Usage
### Usage {#usage}

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

### Example
### Example {#example}

~~~jsx {2}
new richtext.Richtext("#root", {
Expand Down
8 changes: 4 additions & 4 deletions docs/api/events/align.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ description: You can learn about the align event in the documentation of the DHT

# align

### Description
### Description {#description}

@short: Fires when text alignment is changed via the menubar/toolbar or Event Bus methods

### Usage
### Usage {#usage}

~~~jsx {}
"align": ({
align: "left" | "center" | "right" | "justify"
}) => boolean | void;
~~~

### Parameters
### Parameters {#parameters}

The callback of the **align** event can take an object with the following parameter:

Expand All @@ -28,7 +28,7 @@ The callback of the **align** event can take an object with the following parame
For handling inner events you can use [**Event Bus methods**](api/overview/event_bus_methods_overview.md)
:::

### Example
### Example {#example}

~~~jsx {5-12}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/events/clear-text-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description: You can learn about the clear-text-format event in the documentatio

# clear-text-format

### Description
### Description {#description}

@short: Fires when a text format is cleared via the menubar/toolbar or Event Bus methods

### Usage
### Usage {#usage}

~~~jsx {}
"clear-text-format": () => boolean | void;
Expand All @@ -20,7 +20,7 @@ description: You can learn about the clear-text-format event in the documentatio
For handling inner events you can use [**Event Bus methods**](api/overview/event_bus_methods_overview.md)
:::

### Example
### Example {#example}

~~~jsx {5-10}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/events/copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description: You can learn about the copy event in the documentation of the DHTM

# copy

### Description
### Description {#description}

@short: Fires when copying selected text

### Usage
### Usage {#usage}

~~~jsx {}
"copy": () => boolean | void;
Expand All @@ -20,7 +20,7 @@ description: You can learn about the copy event in the documentation of the DHTM
For handling inner events you can use [**Event Bus methods**](api/overview/event_bus_methods_overview.md)
:::

### Example
### Example {#example}

~~~jsx {5-8}
// initialize RichText
Expand Down
8 changes: 4 additions & 4 deletions docs/api/events/create-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ description: You can learn about the create-new event in the documentation of th

# create-new

### Description
### Description {#description}

@short: Fires when pressing the "New" option within the menubar or via Event Bus methods

### Usage
### Usage {#usage}

~~~jsx {}
"create-new": ({ reset?: boolean }) => boolean | void;
~~~

### Parameters
### Parameters {#parameters}

The callback of the **create-new** event can take an object with the following parameter:

Expand All @@ -26,7 +26,7 @@ The callback of the **create-new** event can take an object with the following p
For handling inner events you can use [**Event Bus methods**](api/overview/event_bus_methods_overview.md)
:::

### Example
### Example {#example}

~~~jsx {5-10}
// initialize RichText
Expand Down
6 changes: 3 additions & 3 deletions docs/api/events/cut.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ description: You can learn about the cut event in the documentation of the DHTML

# cut

### Description
### Description {#description}

@short: Fires when cutting selected text

### Usage
### Usage {#usage}

~~~jsx {}
"cut": () => boolean | void;
Expand All @@ -20,7 +20,7 @@ description: You can learn about the cut event in the documentation of the DHTML
For handling inner events you can use [**Event Bus methods**](api/overview/event_bus_methods_overview.md)
:::

### Example
### Example {#example}

~~~jsx {5-8}
// initialize RichText
Expand Down
Loading