Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Izobov committed Jul 10, 2024
2 parents 93a66d9 + 9fd39a8 commit b176e46
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 57 deletions.
91 changes: 61 additions & 30 deletions docs/api/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ title: Properties
description: Get insight into configuration properties utilized for working with text statistics, setting editor mode, and customizing the toolbar in DHTMLX Rich Text Editor.
---


## `customStats`

Defines the logic of displaying custom statistics

`array customStats;`
`customStats?: array;`

```js
~~~jsx
var richtext = new dhx.Richtext("richtext_container", {
customStats: [
{
Expand All @@ -36,65 +35,97 @@ var richtext = new dhx.Richtext("richtext_container", {
],
toolbarBlocks: ["default", "stats"]
});
```
~~~

**Related samples:** [Custom stats](https://snippet.dhtmlx.com/u1734epz)
**Related sample:** [Custom stats](https://snippet.dhtmlx.com/u1734epz)

#### Details

Each field of statistical data represents an object with two properties:

- `name` - (*string*) the name of the field that should be displayed
- `callback` - (*function*) a function that implements the logic of counting entries of the specified field
___

____

## `defaultStyles`

Defines default values of the toolbar selection controls

`defaultStyles?: object;`

~~~jsx {2-5}
var richtext = new dhx.Richtext("richtext_container", {
defaultStyles: {
"font-size": "14px"
"font-family": "Tahoma"
}
});
~~~

**Default value**:

~~~jsx
var defaultStyles = {
"font-family": "Roboto",
"font-size": "14px",
"color": "#4D4D4D",
"background": "#FFFFFF",
"bold": false,
"italic": false,
"strike": false,
"underline": false,
"align": "left", // "left" | "center" | "right" | false
};
~~~

**Related sample:** [RichText. Default styles](https://snippet.dhtmlx.com/pqqq1e5d)
____

## `mode`

The working mode of the RichText editor

`string mode;`
`mode?: string;`

**Values**: "default","document"
**Values**: "default", "document"


```js
~~~jsx
var richtext = new dhx.RichText("richtext_container", {
mode:"document"
mode: "document"
});
```
~~~

**Default value**: "default"

**Related samples:** [RichText. Modes](https://snippet.dhtmlx.com/pdh5buvg)
___
**Related sample:** [RichText. Modes](https://snippet.dhtmlx.com/pdh5buvg)

____

## `toolbarBlocks`

Specifies blocks of buttons that will be shown in the Richtext toolbar

`array toolbarBlocks;`

`toolbarBlocks?: array;`

```js
~~~jsx
// default toolbar blocks
var richtext = new dhx.RichText("richtext_container", {
toolbarBlocks:["undo", "style", "decoration", "colors",
"align", "link"]
toolbarBlocks: ["undo", "style", "decoration", "colors", "align", "link"]
});
```

**Default value**: ["undo", "style", "decoration", "colors", "align", "link"]
~~~

**Related samples:** [RichText. Initialization](https://snippet.dhtmlx.com/32jtemtm)
**Default value**: `["undo", "style", "decoration", "colors", "align", "link"]`

**Related sample:** [RichText. Initialization](https://snippet.dhtmlx.com/32jtemtm)

#### Details

### Full toolbar

The full toolbar contains several more blocks: `"clear"`, `"fullscreen"`, and `"stats"`:

~~~js
~~~jsx
var richtext = new dhx.RichText(document.body, {
// full toolbar
toolbarBlocks: [
Expand All @@ -104,13 +135,13 @@ var richtext = new dhx.RichText(document.body, {
});
~~~

**Related samples:** [RichText. Full Toolbar](https://snippet.dhtmlx.com/5yga5ce1)
**Related sample:** [RichText. Full Toolbar](https://snippet.dhtmlx.com/5yga5ce1)

### Short toolbar definition

The default set of buttons can be specified via the `"default"` definition in the `toolbarBlocks` array, like this:

~~~js
~~~jsx
var richtext = new dhx.RichText(document.body, {
// full toolbar
toolbarBlocks: ["default", "clear", "stats", "fullscreen"]
Expand All @@ -121,12 +152,12 @@ var richtext = new dhx.RichText(document.body, {

It is also possible to create a custom toolbar by setting desired blocks in the random order:

~~~js
~~~jsx
var richtext = new dhx.RichText(document.body, {
toolbarBlocks: ["clear", "colors", "align","decoration",
"undo", "fullscreen","link"
toolbarBlocks: ["clear", "colors", "align", "decoration",
"undo", "fullscreen", "link"
]
});
~~~

**Related sample:** [Toolbar Blocks](https://snippet.dhtmlx.com/yp7en22d)
**Related sample:** [Toolbar Blocks](https://snippet.dhtmlx.com/yp7en22d)
54 changes: 27 additions & 27 deletions docs/whats_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ title: What's new
description: "Get a full picture of the DHTMLX Rich Text Editor versioning: its updates and patch versions, providing the information on implemented functionalities, improvements, and bug fixes."
---

Version 1.1.8
--------------
## Version 1.2

Released on July 10, 2024

### New functionality

- The [`defaultStyles`](api/properties.md#defaultstyles) property allows you to change the default values of the toolbar selection controls

### Fixes

- Add cross widget localization
- Incorrect HTML parsing
- Retyping the text that contains a link invokes an error
- When changing the font, the previous character appears before the text

## Version 1.1.8

Released on February 1, 2024

Expand All @@ -14,44 +28,39 @@ Released on February 1, 2024
- The appearance of the "link" control settings
- The conversion of color formats. Now colors are converted from HEX to RGB during HTML serialization

Version 1.1.7
--------------
## Version 1.1.7

Released on August 31, 2023

### Fixes

- Now you can select several text fragments with different fonts and sizes and set the desired font and size for them

Version 1.1.6
--------------
## Version 1.1.6

Released on February 13, 2022

### Fixes

- Fix the issue with special characters

Version 1.1.5
--------------
## Version 1.1.5

Released on February 13, 2022

### Fixes

- Fix the issue with the [`fullScreen()`](api/methods.md#fullscreen) method

Version 1.1.4
--------------
## Version 1.1.4

Released on January 17, 2022

### Fixes

- Fix links to documentation in the [RichText samples](https://snippet.dhtmlx.com/pdh5buvg?tag=richtext)

Version 1.1.3
--------------
## Version 1.1.3

Released on October 11, 2021

Expand All @@ -61,29 +70,24 @@ Released on October 11, 2021
- Fix the issue with styles of Richtext when using it together with Suite
- Now it is possible to localize the *text* and *link* input labels of the **Link** button of the toolbar


Version 1.1.2
---------------
## Version 1.1.2

Released on February 13, 2020

### Fixes

- Issues with interaction between the HTML form and controls of Toolbar

Version 1.1.1
---------------
## Version 1.1.1

Released on March 6, 2019

### Fixes

- Fix the bug with Toolbar items
- Fix z-index for the full screen mode
- Fix z-index for the full screen mode


Version 1.1
-------------
## Version 1.1

Released on February 27, 2019

Expand All @@ -104,8 +108,7 @@ Released on February 27, 2019
- Spellchecking is disabled
- Support for Asian languages

Version 1.0.1
----------------
## Version 1.0.1

Released on December 19, 2018

Expand All @@ -115,9 +118,7 @@ Released on December 19, 2018
- Issue with the link background on switching between links
- Issue with toolbar modifiers after removing a letter


Version 1.0
----------------
## Version 1.0

Released on December 13, 2018

Expand All @@ -129,4 +130,3 @@ Released on December 13, 2018
- [Full screen mode](guides/working_with_richtext.md#full-screen-mode)
- Cross browser compatibility
- IE11+ support

0 comments on commit b176e46

Please sign in to comment.