You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/diagram_editor/initialization.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
---
2
2
sidebar_label: Initialization
3
-
title: Editor initialization
3
+
title: Diagram Editor initialization
4
4
description: You can learn how to start with Diagram Editor in the documentation of the DHTMLX JavaScript Diagram library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Diagram.
5
5
---
6
6
7
-
# Editor initialization
7
+
# Diagram Editor initialization
8
8
9
9
This article covers the process of displaying a Diagram Editor on a page. In order to initialize the editor, you need to include source files specific for Editor and use the `DiagramEditor` instance. In all other aspects the initialization stage is the same as for the Diagram component:
10
10
11
11
-[Download the DHTMLX Diagram package](https://dhtmlx.com/docs/products/dhtmlxDiagram/download.shtml) and unpack it into a folder of your project
12
12
-[Include the source files on a page](#including-required-code-files)
13
-
-[Initialize the Editor with the object constructor](#initializing-editor)
14
-
-[Load data into the Editor](#loading-data-into-editor)
13
+
-[Initialize Diagram Editor with the object constructor](#initializing-diagram-editor)
14
+
-[Load data into the Diagram Editor](#loading-data-into-diagram-editor)
15
15
16
16
~~~html
17
17
<!DOCTYPE html>
@@ -34,7 +34,7 @@ This article covers the process of displaying a Diagram Editor on a page. In ord
@@ -67,24 +67,24 @@ You can import JavaScript Diagram Editor into your project using the `yarn` or `
67
67
#### Installing trial Diagram Editor via npm and yarn
68
68
69
69
:::info
70
-
If you want to use the trial version of Diagram Editor, download the [**trial Diagram package**](https://dhtmlx.com/docs/products/dhtmlxDiagram/download.shtml) and follow the steps mentioned in the *README* file. Note that the trial Diagram is available 30 days only.
70
+
If you want to use the trial version of Diagram Editor, download the [**trial Diagram package**](https://dhtmlx.com/docs/products/dhtmlxDiagram/download.shtml) and follow the steps mentioned in the *README* file. Note that the trial Diagram Editor is available 30 days only.
71
71
:::
72
72
73
73
#### Installing PRO Diagram Editor via npm and yarn
74
74
75
75
:::info
76
-
If you already have Diagram under the proprietary license, send your **license number** to the *contact@dhtmlx.com* email to receive a login and a password for a private **npm** as well as a detailed guide on how to install Diagram. Note that a private **npm** is available before the expiration of the proprietary Diagram license.
76
+
If you already have Diagram Editor under the proprietary license, send your **license number** to the *contact@dhtmlx.com* email to receive a login and a password for a private **npm** as well as a detailed guide on how to install Diagram Editor. Note that a private **npm** is available before the expiration of the proprietary Diagram Editor license.
77
77
:::
78
78
79
-
## Initializing Editor
79
+
## Initializing Diagram Editor
80
80
81
81
You can initialize a Diagram Editor in a container, in the document body, or in a layout cell.
82
82
83
83
### Initialization in a container
84
84
85
-
To initialize an editor in a container, use the `dhx.DiagramEditor` constructor and pass the following two parameters to the constructor function:
85
+
To initialize Diagram Editor in a container, use the `dhx.DiagramEditor` constructor and pass the following two parameters to the constructor function:
86
86
87
-
- a container to place an Editor into, let's give it the *"editor_container"* id:
87
+
- a container to place Diagram Editor into, let's give it the *"editor_container"* id:
88
88
89
89
~~~html title="index.html"
90
90
<divid="editor_container"></div>
@@ -100,7 +100,7 @@ const editor = new dhx.DiagramEditor("editor_container", {
100
100
101
101
### Initialization in the document body
102
102
103
-
It is also possible to skip setting a container for Editor and to add it right into the document's body:
103
+
It is also possible to skip setting a container for Diagram Editor and to add it right into the document's body:
104
104
105
105
~~~jsx
106
106
consteditor=newdhx.DiagramEditor(document.body, {
@@ -143,7 +143,7 @@ const editor = new dhx.DiagramEditor("editor_container", {
143
143
144
144
Check [the full list of configuration properties of Editor](/api/diagram_editor/editor/config/overview/).
145
145
146
-
## Loading data into Editor
146
+
## Loading data into Diagram Editor
147
147
148
148
It is possible to load an [appropriate data set](../../../guides/loading_data/#preparing-data-to-load) into the editor via the [parse()](../../../api/diagram_editor/editor/methods/parse_method/) method of the editor.
Copy file name to clipboardExpand all lines: docs/guides/integrations/angular_integration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ body {
135
135
136
136
#### Loading data
137
137
138
-
To add data into Diagram Editor, you need to provide a data set. You can create the **data.ts** file in the **src/app/diagram-editor/** directory and add some data into it:
138
+
To add data into Diagram Editor, you need to provide a [**data set**](https://github.com/DHTMLX/angular-diagram-demo/blob/master/src/app/diagram/data.ts). You can create the **data.ts** file in the **src/app/diagram-editor/** directory and add some data into it:
Copy file name to clipboardExpand all lines: docs/guides/integrations/react_integration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ export default function DiagramEditorComponent(props) {
111
111
112
112
#### Adding styles
113
113
114
-
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the main css file of the project:
114
+
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the CSS file of the project:
115
115
116
116
~~~css title="index.css"
117
117
/* specify styles for initial page */
@@ -132,7 +132,7 @@ body,
132
132
133
133
#### Loading data
134
134
135
-
To add data into the Diagram Editor, you need to provide a data set. Let's create the ***data.js*** file in the ***src/*** directory and add some data into it:
135
+
To add data into the Diagram Editor, you need to provide a [**data set**](https://github.com/DHTMLX/react-diagram-demo/blob/master/src/data.js). Let's create the ***data.js*** file in the ***src/*** directory and add some data into it:
Copy file name to clipboardExpand all lines: docs/guides/integrations/svelte_integration.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ To create a **Svelte** JS project, run the following command:
24
24
npm create vite@latest
25
25
~~~
26
26
27
-
Let's name the project as **my-svelte-diagram-app**.
27
+
Select Svelte and JavaScript options while creating the project. Let's name the project as **my-svelte-diagram-app**.
28
28
29
29
### Installation of dependencies
30
30
@@ -40,7 +40,7 @@ Then you need to install dependencies and run the app. For this, you need to mak
40
40
41
41
~~~jsx
42
42
yarn
43
-
yarn dev// or yarn dev
43
+
yarn start// or yarn dev
44
44
~~~
45
45
46
46
- if you use [**npm**](https://www.npmjs.com/), you need to call the following commands:
@@ -118,7 +118,7 @@ To display Diagram Editor on the page, you need to create the container for Diag
118
118
119
119
#### Adding styles
120
120
121
-
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the main css file of the project:
121
+
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the CSS file of the project:
122
122
123
123
~~~css title="app.css"
124
124
/* specify styles for initial page */
@@ -139,7 +139,7 @@ body,
139
139
140
140
#### Loading data
141
141
142
-
To add data into the Diagram Editor, we need to provide a data set. Let's create the ***data.js*** file in the ***src/*** directory and add some data into it:
142
+
To add data into the Diagram Editor, we need to provide a [**data set**](https://github.com/DHTMLX/svelte-diagram-demo/blob/main/src/data.js). Let's create the ***data.js*** file in the ***src/*** directory and add some data into it:
143
143
144
144
~~~jsx title="data.js"
145
145
exportfunctiongetData() {
@@ -167,7 +167,7 @@ export function getData() {
167
167
}
168
168
~~~
169
169
170
-
Then open the ***App.svelte*** file, import data, and pass it into the new created `<DiagramEditor/>` components as **props**:
170
+
Then open the ***App.svelte*** file, import data, and pass it into the newly created `<DiagramEditor/>` components as **props**:
Copy file name to clipboardExpand all lines: docs/guides/integrations/vue_integration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ export default {
120
120
121
121
#### Adding styles
122
122
123
-
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the main css file of the project:
123
+
To display Diagram Editor correctly, you need to specify important styles for Diagram Editor and its container in the CSS file of the project:
124
124
125
125
~~~css title="style.css"
126
126
/* specify styles for initial page */
@@ -141,7 +141,7 @@ body,
141
141
142
142
#### Loading data
143
143
144
-
To add data into the Diagram Editor, you need to provide a data set. You can create the ***data.js*** file in the ***src/*** directory and add some data into it:
144
+
To add data into the Diagram Editor, you need to provide a [**data set**](https://github.com/DHTMLX/vue-diagram-demo/blob/master/src/data.js). You can create the ***data.js*** file in the ***src/*** directory and add some data into it:
0 commit comments