Skip to content

Commit eca2cda

Browse files
[update] how to start and overview guides
1 parent b5ab5f2 commit eca2cda

2 files changed

Lines changed: 82 additions & 62 deletions

File tree

docs/how_to_start.md

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
22
sidebar_label: How to start
33
title: How to start
4-
description: Learn how to quickly create DHTMLX Rich Text Editor on a page and set up its basic configuration in four simple steps.
4+
description: You can explore how to start working with DHTMLX RichText 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.
55
---
66

77
# How to start
88

9-
RichText editor will make text editing quick and comfortable due to the inbuilt set of handy formatting tools.
10-
Follow this comprehensive and easy-to-reproduce tutorial to create RichText editor on a page and start working with it.
9+
This clear and comprehensive tutorial will guide your through the steps you need to take in order to get a full-functional RichText on a page.
1110

12-
![DHTMLX RichText Classic Mode](./assets/classic_mode.png)
11+
![DHTMLX RichText Classic Mode](./assets/richtext/classic_mode.png)
1312

14-
## Step 1. Include source files
13+
## Step 1. Including source files
1514

16-
First create an HTML file with the name ***index.html***. Then include the source files of DHTMLX RichText into this file. [Take a look at the structure of RichText package](guides/initialization.md#including-source-files).
15+
Start from creating an HTML file and call it *index.html*. Then proceed to include RichText source files into the created file.
1716

18-
You need to include the following two files:
17+
There are two necessary files:
1918

20-
- the JS file of DHTMLX RichText
21-
- the CSS file of DHTMLX RichText
19+
- the JS file of RichText
20+
- the CSS file of RichText
2221

23-
~~~html title="index.html" {5-6}
22+
~~~html {5-6} title="index.html"
2423
<!DOCTYPE html>
2524
<html>
2625
<head>
27-
<title>How to Start with DHTMLX RichText</title>
28-
<script type="text/javascript" src="./codebase/richtext.js"></script>
29-
<link rel="stylesheet" href="./codebase/richtext.css">
26+
<title>How to Start with RichText</title>
27+
<script src="./codebase/richtext.js"></script>
28+
<link href="./codebase/richtext.css" rel="stylesheet">
3029
</head>
3130
<body>
3231
<script>
@@ -52,26 +51,29 @@ If you want to use trial version of RichText, download the [**trial RichText pac
5251
You can access the DHTMLX private **npm** directly in the [Client's Area](https://dhtmlx.com/clients/) by generating your login and password for **npm**. A detailed installation guide is also available there. Please note that access to the private **npm** is available only while your proprietary RichText license is active.
5352
:::
5453

55-
## Step 2. Create RichText
54+
## Step 2. Creating RichText
5655

57-
At this step you can add RichText on a page. There are two easy steps:
56+
Now you are ready to add RichText to the page. First, let's create the `<div>` container for RichText. So, take the following steps:
5857

59-
- Open the ***index.html*** file and create a DIV container in it.
60-
- Initialize DHTMLX RichText in the container with the `richtext.Richtext` constructor. As the parameters of the constructor, pass the container you've created above and the configuration object of RichText as follows:
58+
- specify a DIV container in the *index.html* file
59+
- initialize RichText using the **richtext.Richtext** constructor
6160

62-
~~~html title="index.html"
61+
As parameters, the constructor takes the ID of HTML container where the RichText will be placed into, as well as corresponding configuration objects.
62+
63+
~~~html {9,12-14} title="index.html"
6364
<!DOCTYPE html>
6465
<html>
6566
<head>
66-
<title>How to Start with DHTMLX RichText</title>
67-
<script type="text/javascript" src="./codebase/richtext.js"></script>
68-
<link rel="stylesheet" href="./codebase/richtext.css">
67+
<title>How to Start with RichText</title>
68+
<script src="./codebase/richtext.js"></script>
69+
<link href="./codebase/richtext.css" rel="stylesheet">
6970
</head>
7071
<body>
7172
<div id="root"></div>
73+
7274
<script>
7375
const editor = new richtext.Richtext("#root", {
74-
// configuration settings
76+
// configuration properties
7577
});
7678
</script>
7779
</body>
@@ -80,20 +82,26 @@ At this step you can add RichText on a page. There are two easy steps:
8082

8183
## Step 3. Configuring RichText
8284

83-
Now it's time to define configuration properties to make the RichText meet you needs.
84-
85-
RichText includes several properties that let you adjust the Toolbar appearance and behavior as well as choose the most suitable mode of work with a document. [Learn all the available settings](api/properties.md).
86-
87-
For example, you can specify the **"document"** mode of RichText displaying:
88-
89-
~~~jsx
90-
const rich = new richtext.Richtext("#root", {
91-
mode: "document"
85+
Next you can specify configuration properties you want the RichText component to have when initialized.
86+
87+
To start working with RichText, first you need to provide the initial data for editor via the [`value`](api/config/value.md) property. Beside this, you can enable [**menubar**](api/config/menubar.md), customize [**toolbar**](api/config/toolbar.md), specify [**fullscreen**](api/config/fullscreen.md) and [**layout**](api/config/layout-mode.md) modes, apply new [**locale**](api/config/locale.md) and [**default styles**](api/config/default-styles.md).
88+
89+
~~~jsx {2-12}
90+
const editor = new richtext.Richtext("#root", {
91+
menubar: true,
92+
toolbar: false,
93+
fullscreen: true,
94+
layoutMode: "document",
95+
locale: richtext.locale.cn
96+
defaultStyles: {
97+
h4: {
98+
"font-size": "17px"
99+
},
100+
// other settings
101+
}
92102
});
93103
~~~
94104

95-
There is a [detailed description of available RichText configuration settings](guides/configuration.md).
96-
97-
## Step 4. Set content (optional)
105+
## What's next
98106

99-
If necessary, you can parse some text in the HTML or Markdown format on the RichText initialization. Read more about this feature in the [related article](guides/loading_data.md).
107+
That's all. Just three simple steps and you have a handy tool for visualizing and managing the workflow. Now you can start working with your content or keep exploring the inner world of JavaScript RichText.

docs/index.md

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,72 @@
11
---
22
sidebar_label: RichText overview
33
title: RichText overview
4-
description: Get a general idea of DHTMLX Rich Text Editor, its purpose, Toolbar structure, editing modes, supported text formats, and available integrations with JavaScript frameworks.
54
slug: /
5+
description: You can have an overview of DHTMLX JavaScript Kanban library in the documentation. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
66
---
77

88
# RichText overview
99

10-
DHTMLX RichText is a JavaScript client-side tool for fast and handy editing of content. It provides a compact set of formatting controls, two editing modes for comfy work with text and an easily adjustable Toolbar.
10+
**DHTMLX RichText** is a flexible and lightweight WYSIWYG editor built with JavaScript. Designed to provide a seamless editing experience in modern web applications, RichText offers a clean UI, rich formatting capabilities, and full control over content rendering. Whether you're building a CMS, an internal admin tool, or an embedded document editor, RichText can be easily integrated and customized to match your needs.
1111

12-
This component supports parsing and serialization of data in the HTML and JSON formats and allows using any icon fonts and adding custom controls. Besides, there are ready-made solutions for integration with
13-
such popular JavaScript frameworks as Angular, React and Vue.js.
12+
**DHTMLX RichText** component includes the following features:
1413

15-
## Toolbar structure
14+
- Multiple editing modes, including visual and source view
1615

17-
The Toolbar of RichText is [easily configurable](guides/configuration.md#toolbar). It contains several blocks of controls and their number depends on the chosen type of Toolbar:
16+
- Content serialization to both HTML and JSON
1817

19-
- default Toolbar
20-
- full Toolbar
18+
- A configurable **toolbar** and **menubar** with built-in and custom buttons
2119

22-
### Default Toolbar
20+
- Image uploading, rich formatting, custom styling, and layout modes
2321

24-
The **default Toolbar** includes 6 blocks of controls. They are: "undo", "style", "decoration", "colors", "align" and "link":
22+
- Full API access for event handling, content manipulation, and reactive state management
2523

26-
![Default Toolbar](./assets/default_toolbar.png)
24+
RichText is framework-agnostic and provides official wrappers for React, Angular, Vue, and Svelte, making it suitable for a wide range of front-end ecosystems.
2725

28-
### Full Toolbar
26+
This documentation provides detailed guidance on installation, configuration, usage, and customization. You'll find examples for common scenarios, full API references, and best practices for embedding RichText into your application.
2927

30-
The **full Toolbar** includes all the default blocks and additional "clear", "stats" and "fullscreen" blocks:
28+
## RichText structure
3129

32-
![Full Toolbar](./assets/full_toolbar.png)
30+
### Toolbar
3331

34-
You can [adjust the look and feel of the Toolbar](guides/customization.md) to meet your requirements.
32+
The RichText toolbar provides quick access to text formatting and structural editing features. By default, it is enabled and displays a predefined set of commonly used controls such as bold, italic, font settings, and list formatting.
3533

36-
## Two working modes
34+
The [`toolbar`](api/config/toolbar.md) property allows you to fully customize the toolbar’s content and layout. You can enable or disable toolbar, rearrange default controls, or define a fully custom toolbar using an array of predefined button identifiers and custom button objects.
3735

38-
DHTMLX RichText can work with content in [two modes](guides/configuration.md). You can choose the most suitable mode to feel comfortable while editing text. The modes are:
36+
![Toolbar](./assets/richtext/toolbar.png)
3937

40-
- "classic"
38+
### Menubar
4139

42-
![Classic mode](./assets/classic_mode.png)
40+
The RichText menubar provides access to high-level editing actions such as creating a new document, printing, importing/exporting content, and more. It is hidden by default.
4341

44-
- "document"
42+
Use the [`menubar`](api/config/menubar.md) property to toggle its visibility. While the menubar can be enabled or disabled, its contents are not configurable at this time.
4543

46-
![Document mode](./assets/doc_mode.png)
44+
![Menubar](./assets/richtext/menubar.png)
4745

48-
[Read more](guides/configuration.md#working-modes) about setting the mode you like best.
46+
### Editor
4947

50-
## Supported formats
48+
The RichText editor is the central area where users create and format content. You can control the editor’s appearance and behavior through configuration options such as [`value`](api/config/value.md), [`layoutMode`](api/config/layout-mode.md), and [`defaultStyles`](api/config/default-styles.md). RichText also supports custom styling, image embedding, and responsive layout adjustments to match the needs of your application.
49+
50+
### Two working modes
51+
52+
DHTMLX RichText can work with content in "classic" and "document" modes. You can choose the most suitable mode to feel comfortable while editing text. Use the [`layoutMode`](api/config/layout-mode.md) property to switch modes programatically.
53+
54+
- **"classic"**
55+
56+
![Classic mode](./assets/richtext/classic_mode.png)
57+
58+
- **"document"**
59+
60+
![Document mode](./assets/richtext/document_mode.png)
61+
62+
### Supported formats
5163

5264
The RichText editor supports [parsing](guides/loading_data.md#adding-content-into-editor) and [serialization](guides/working_with_richtext.md#getting-content-from-editor) of content in the [HTML and Markdown formats](guides/loading_data.md#format-of-content).
5365

54-
- HTML format
66+
#### HTML format
5567

56-
![HTML format](./assets/html_format.png)
68+
![HTML format](./assets/richtext/html_format.png)
5769

58-
- Markdown format
70+
#### Text format
5971

60-
![Markdown format](./assets/markdown_format.png)
72+
![Text format](./assets/richtext/text_format.png)

0 commit comments

Comments
 (0)