Skip to content

Commit 58b2664

Browse files
[update] Whats new before release 1.2
1 parent c9de8c6 commit 58b2664

2 files changed

Lines changed: 99 additions & 57 deletions

File tree

docs/api/properties.md

Lines changed: 71 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ title: Properties
44
description: Get insight into configuration properties utilized for working with text statistics, setting editor mode, and customizing the toolbar in DHTMLX Rich Text Editor.
55
---
66

7-
87
## `customStats`
98

109
Defines the logic of displaying custom statistics
1110

12-
`array customStats;`
11+
`customStats?: array;`
1312

14-
```js
13+
~~~jsx
1514
var richtext = new dhx.Richtext("richtext_container", {
1615
customStats: [
1716
{
@@ -36,65 +35,107 @@ var richtext = new dhx.Richtext("richtext_container", {
3635
],
3736
toolbarBlocks: ["default", "stats"]
3837
});
39-
```
38+
~~~
4039

41-
**Related samples:** [Custom stats](https://snippet.dhtmlx.com/u1734epz)
40+
**Related sample:** [Custom stats](https://snippet.dhtmlx.com/u1734epz)
4241

4342
#### Details
4443

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

4746
- `name` - (*string*) the name of the field that should be displayed
4847
- `callback` - (*function*) a function that implements the logic of counting entries of the specified field
49-
___
48+
49+
____
50+
51+
## `defaultStyles`
52+
53+
Defines default values of the toolbar selection controls
54+
55+
`defaultStyles?: object;`
56+
57+
~~~jsx {2-12}
58+
var richtext = new dhx.Richtext("richtext_container", {
59+
defaultStyles: {
60+
paragraph: {
61+
"font-size": "14px"
62+
},
63+
h1: {
64+
"font-size": "20px"
65+
},
66+
"*": { // styles that apply to all types of blocks
67+
"font-family":"Tahoma"
68+
}
69+
}
70+
});
71+
~~~
72+
73+
**Default value**:
74+
75+
~~~jsx
76+
var defaultStyles = {
77+
"font-family": "Roboto",
78+
"font-size": "14px",
79+
"color": "#4D4D4D",
80+
"background": "#FFFFFF",
81+
"bold": false,
82+
"italic": false,
83+
"strike": false,
84+
"underline": false,
85+
"style": "p",
86+
"blockquote": false,
87+
"align": false
88+
};
89+
~~~
90+
91+
**Related sample:** [Default styles](https://snippet.dhtmlx.com/vewoiptc)
92+
93+
____
5094

5195
## `mode`
5296

5397
The working mode of the RichText editor
5498

55-
`string mode;`
56-
57-
**Values**: "default","document"
99+
`mode?: string;`
58100

101+
**Values**: "default", "document"
59102

60-
```js
103+
~~~jsx
61104
var richtext = new dhx.RichText("richtext_container", {
62-
mode:"document"
105+
mode: "document"
63106
});
64-
```
107+
~~~
65108

66109
**Default value**: "default"
67110

68-
**Related samples:** [RichText. Modes](https://snippet.dhtmlx.com/pdh5buvg)
69-
___
111+
**Related sample:** [RichText. Modes](https://snippet.dhtmlx.com/pdh5buvg)
112+
113+
____
70114

71115
## `toolbarBlocks`
72116

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

75-
`array toolbarBlocks;`
76-
119+
`toolbarBlocks?: array;`
77120

78-
```js
121+
~~~jsx
79122
// default toolbar blocks
80123
var richtext = new dhx.RichText("richtext_container", {
81-
toolbarBlocks:["undo", "style", "decoration", "colors",
82-
"align", "link"]
124+
toolbarBlocks: ["undo", "style", "decoration", "colors", "align", "link"]
83125
});
84-
```
85-
86-
**Default value**: ["undo", "style", "decoration", "colors", "align", "link"]
126+
~~~
87127

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

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

91132
#### Details
92133

93134
### Full toolbar
94135

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

97-
~~~js
138+
~~~jsx
98139
var richtext = new dhx.RichText(document.body, {
99140
// full toolbar
100141
toolbarBlocks: [
@@ -104,13 +145,13 @@ var richtext = new dhx.RichText(document.body, {
104145
});
105146
~~~
106147

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

109150
### Short toolbar definition
110151

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

113-
~~~js
154+
~~~jsx
114155
var richtext = new dhx.RichText(document.body, {
115156
// full toolbar
116157
toolbarBlocks: ["default", "clear", "stats", "fullscreen"]
@@ -121,12 +162,12 @@ var richtext = new dhx.RichText(document.body, {
121162

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

124-
~~~js
165+
~~~jsx
125166
var richtext = new dhx.RichText(document.body, {
126-
toolbarBlocks: ["clear", "colors", "align","decoration",
127-
"undo", "fullscreen","link"
167+
toolbarBlocks: ["clear", "colors", "align", "decoration",
168+
"undo", "fullscreen", "link"
128169
]
129170
});
130171
~~~
131172

132-
**Related sample:** [Toolbar Blocks](https://snippet.dhtmlx.com/yp7en22d)
173+
**Related sample:** [Toolbar Blocks](https://snippet.dhtmlx.com/yp7en22d)

docs/whats_new.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@ title: What's new
44
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."
55
---
66

7-
Version 1.1.8
8-
--------------
7+
## Version 1.2
8+
9+
Released on June 18, 2024
10+
11+
### New functionality
12+
13+
- The [`defaultStyles`](api/properties.md#defaultstyles) property allows you to change the default values of the toolbar selection controls
14+
15+
### Fixes
16+
17+
- Add cross widget localization
18+
- Add scripts to deploy npm-pro and npm trial packages
19+
- Incorrect HTML parsing
20+
- Retyping the text that contains a link invokes an error
21+
- When changing the font, the previous character appears before the text
22+
23+
## Version 1.1.8
924

1025
Released on February 1, 2024
1126

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

17-
Version 1.1.7
18-
--------------
32+
## Version 1.1.7
1933

2034
Released on August 31, 2023
2135

2236
### Fixes
2337

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

26-
Version 1.1.6
27-
--------------
40+
## Version 1.1.6
2841

2942
Released on February 13, 2022
3043

3144
### Fixes
3245

3346
- Fix the issue with special characters
3447

35-
Version 1.1.5
36-
--------------
48+
## Version 1.1.5
3749

3850
Released on February 13, 2022
3951

4052
### Fixes
4153

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

44-
Version 1.1.4
45-
--------------
56+
## Version 1.1.4
4657

4758
Released on January 17, 2022
4859

4960
### Fixes
5061

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

53-
Version 1.1.3
54-
--------------
64+
## Version 1.1.3
5565

5666
Released on October 11, 2021
5767

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

64-
65-
Version 1.1.2
66-
---------------
74+
## Version 1.1.2
6775

6876
Released on February 13, 2020
6977

7078
### Fixes
7179

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

74-
Version 1.1.1
75-
---------------
82+
## Version 1.1.1
7683

7784
Released on March 6, 2019
7885

7986
### Fixes
8087

8188
- Fix the bug with Toolbar items
82-
- Fix z-index for the full screen mode
89+
- Fix z-index for the full screen mode
8390

84-
85-
Version 1.1
86-
-------------
91+
## Version 1.1
8792

8893
Released on February 27, 2019
8994

@@ -104,8 +109,7 @@ Released on February 27, 2019
104109
- Spellchecking is disabled
105110
- Support for Asian languages
106111

107-
Version 1.0.1
108-
----------------
112+
## Version 1.0.1
109113

110114
Released on December 19, 2018
111115

@@ -115,9 +119,7 @@ Released on December 19, 2018
115119
- Issue with the link background on switching between links
116120
- Issue with toolbar modifiers after removing a letter
117121

118-
119-
Version 1.0
120-
----------------
122+
## Version 1.0
121123

122124
Released on December 13, 2018
123125

@@ -129,4 +131,3 @@ Released on December 13, 2018
129131
- [Full screen mode](guides/working_with_richtext.md#full-screen-mode)
130132
- Cross browser compatibility
131133
- IE11+ support
132-

0 commit comments

Comments
 (0)