Skip to content

Commit aa69335

Browse files
committed
Merge branch 'master' into next
2 parents feb8464 + 92ed569 commit aa69335

File tree

130 files changed

+6023
-3845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+6023
-3845
lines changed

README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,50 @@
1-
## DHTMLX Spreadsheet Documentation
1+
<h1 align="center"><a href="https://docs.dhtmlx.com/spreadsheet/">DHTMLX Spreadsheet Documentation</a></h1>
22

3-
### Installation
3+
[DHTMLX Spreadsheet](https://dhtmlx.com/docs/products/dhtmlxSpreadsheet/) is a client-side JavaScript component that allows editing and formatting data in spreadsheets online. It includes a configurable toolbar, handy menu and context menu, and adjustable grid, supports hot keys navigation, loads data both from external and local sources, provides the ability to localize interface into the desired language.
4+
5+
## Explore documentation locally
6+
7+
To run the Spreadsheet documentation locally, take the following steps:
8+
9+
#### 1. Clone the documentation to the local folder
10+
11+
```
12+
$ git clone [email protected]:DHTMLX/docs-spreadsheet.git
13+
$ cd docs-spreadsheet
14+
```
15+
16+
#### 2. Install dependencies
417

518
```
619
$ yarn
720
```
821

9-
### Local Development
22+
#### 3. Run the documentation on the local server and explore it
1023

1124
```
1225
$ yarn start
1326
```
1427

15-
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
28+
## Related sources
1629

17-
### Build
30+
[Download DHTMLX Spreadsheet](https://dhtmlx.com/docs/products/dhtmlxSpreadsheet/download.shtml)
1831

19-
```
20-
$ yarn build
21-
```
32+
[Live demos](https://snippet.dhtmlx.com/ihtkdcoc?mode=wide&text=#spreadsheet)
2233

23-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
34+
[Blog](https://dhtmlx.com/blog/tag/spreadsheet/)
2435

25-
### Deployment
36+
[Forum](https://forum.dhtmlx.com/c/widgets/spreadsheet)
2637

27-
```
28-
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
29-
```
38+
## Follow us
39+
40+
Star our GitHub repo :star:
41+
42+
Watch our tutorials on [YouTube](https://www.youtube.com/user/dhtmlx/videos) :eyes:
43+
44+
Read us on [Medium](https://medium.com/@dhtmlx) :newspaper:
45+
46+
Follow us on [Twitter](https://twitter.com/dhtmlx) :feet:
47+
48+
Like our page on [Facebook](https://www.facebook.com/dhtmlx/) :thumbsup:
3049

31-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
50+
See our news on [Linkedin](https://www.linkedin.com/groups/3345009/) :mega:

docker/redirects.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,5 @@
113113
/api__spreadsheet_beforerowadd_event.html /spreadsheet/api/spreadsheet_beforerowadd_event/;
114114
/api__spreadsheet_beforerowdelete_event.html /spreadsheet/api/spreadsheet_beforerowdelete_event/;
115115

116+
/index.html /spreadsheet/;
117+

docs/api/api_overview.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ Parameters:
2323
## Spreadsheet methods
2424

2525
| Name | Description |
26-
| -------------------------------------------- | --------------------------------------------------- |
26+
| :------------------------------------------- | :-------------------------------------------------- |
2727
| [](api/spreadsheet_addcolumn_method.md) | @getshort(api/spreadsheet_addcolumn_method.md) |
2828
| [](api/spreadsheet_addrow_method.md) | @getshort(api/spreadsheet_addrow_method.md) |
2929
| [](api/spreadsheet_addsheet_method.md) | @getshort(api/spreadsheet_addsheet_method.md) |
30+
| [](api/spreadsheet_clear_method.md) | @getshort(api/spreadsheet_clear_method.md) |
31+
| [](api/spreadsheet_clearsheet_method.md) | @getshort(api/spreadsheet_clearsheet_method.md) |
3032
| [](api/spreadsheet_deletecolumn_method.md) | @getshort(api/spreadsheet_deletecolumn_method.md) |
3133
| [](api/spreadsheet_deleterow_method.md) | @getshort(api/spreadsheet_deleterow_method.md) |
3234
| [](api/spreadsheet_eachcell_method.md) | @getshort(api/spreadsheet_eachcell_method.md) |
@@ -44,6 +46,7 @@ Parameters:
4446
| [](api/spreadsheet_redo_method.md) | @getshort(api/spreadsheet_redo_method.md) |
4547
| [](api/spreadsheet_removesheet_method.md) | @getshort(api/spreadsheet_removesheet_method.md) |
4648
| [](api/spreadsheet_serialize_method.md) | @getshort(api/spreadsheet_serialize_method.md) |
49+
| [](api/spreadsheet_setactivesheet_method.md) | @getshort(api/spreadsheet_setactivesheet_method.md) |
4750
| [](api/spreadsheet_setformat_method.md) | @getshort(api/spreadsheet_setformat_method.md) |
4851
| [](api/spreadsheet_setstyle_method.md) | @getshort(api/spreadsheet_setstyle_method.md) |
4952
| [](api/spreadsheet_setvalue_method.md) | @getshort(api/spreadsheet_setvalue_method.md) |
@@ -54,7 +57,8 @@ Parameters:
5457
## Spreadsheet events
5558

5659
| Name | Description |
57-
| ----------------------------------------------- | ------------------------------------------------------ |
60+
| :---------------------------------------------- | :----------------------------------------------------- |
61+
| [](api/spreadsheet_afterclear_event.md) | @getshort(api/spreadsheet_afterclear_event.md) |
5862
| [](api/spreadsheet_aftercolumnadd_event.md) | @getshort(api/spreadsheet_aftercolumnadd_event.md) |
5963
| [](api/spreadsheet_aftercolumndelete_event.md) | @getshort(api/spreadsheet_aftercolumndelete_event.md) |
6064
| [](api/spreadsheet_aftereditend_event.md) | @getshort(api/spreadsheet_aftereditend_event.md) |
@@ -66,10 +70,12 @@ Parameters:
6670
| [](api/spreadsheet_afterselectionset_event.md) | @getshort(api/spreadsheet_afterselectionset_event.md) |
6771
| [](api/spreadsheet_aftersheetadd_event.md) | @getshort(api/spreadsheet_aftersheetadd_event.md) |
6872
| [](api/spreadsheet_aftersheetchange_event.md) | @getshort(api/spreadsheet_aftersheetchange_event.md) |
73+
| [](api/spreadsheet_aftersheetclear_event.md) | @getshort(api/spreadsheet_aftersheetclear_event.md) |
6974
| [](api/spreadsheet_aftersheetremove_event.md) | @getshort(api/spreadsheet_aftersheetremove_event.md) |
7075
| [](api/spreadsheet_aftersheetrename_event.md) | @getshort(api/spreadsheet_aftersheetrename_event.md) |
7176
| [](api/spreadsheet_afterstylechange_event.md) | @getshort(api/spreadsheet_afterstylechange_event.md) |
7277
| [](api/spreadsheet_aftervaluechange_event.md) | @getshort(api/spreadsheet_aftervaluechange_event.md) |
78+
| [](api/spreadsheet_beforeclear_event.md) | @getshort(api/spreadsheet_beforeclear_event.md) |
7379
| [](api/spreadsheet_beforecolumnadd_event.md) | @getshort(api/spreadsheet_beforecolumnadd_event.md) |
7480
| [](api/spreadsheet_beforecolumndelete_event.md) | @getshort(api/spreadsheet_beforecolumndelete_event.md) |
7581
| [](api/spreadsheet_beforeeditend_event.md) | @getshort(api/spreadsheet_beforeeditend_event.md) |
@@ -81,6 +87,7 @@ Parameters:
8187
| [](api/spreadsheet_beforeselectionset_event.md) | @getshort(api/spreadsheet_beforeselectionset_event.md) |
8288
| [](api/spreadsheet_beforesheetadd_event.md) | @getshort(api/spreadsheet_beforesheetadd_event.md) |
8389
| [](api/spreadsheet_beforesheetchange_event.md) | @getshort(api/spreadsheet_beforesheetchange_event.md) |
90+
| [](api/spreadsheet_beforesheetclear_event.md) | @getshort(api/spreadsheet_beforesheetclear_event.md) |
8491
| [](api/spreadsheet_beforesheetremove_event.md) | @getshort(api/spreadsheet_beforesheetremove_event.md) |
8592
| [](api/spreadsheet_beforesheetrename_event.md) | @getshort(api/spreadsheet_beforesheetrename_event.md) |
8693
| [](api/spreadsheet_beforestylechange_event.md) | @getshort(api/spreadsheet_beforestylechange_event.md) |
@@ -91,6 +98,7 @@ Parameters:
9198
| Name | Description |
9299
| ---------------------------------------------- | ----------------------------------------------------- |
93100
| [](api/spreadsheet_colscount_config.md) | @getshort(api/spreadsheet_colscount_config.md) |
101+
| [](api/spreadsheet_dateformat_config.md) | @getshort(api/spreadsheet_dateformat_config.md) |
94102
| [](api/spreadsheet_editline_config.md) | @getshort(api/spreadsheet_editline_config.md) |
95103
| [](api/spreadsheet_exportmodulepath_config.md) | @getshort(api/spreadsheet_exportmodulepath_config.md) |
96104
| [](api/spreadsheet_formats_config.md) | @getshort(api/spreadsheet_formats_config.md) |
@@ -104,12 +112,13 @@ Parameters:
104112

105113
## Selection methods
106114

107-
| Name | Description |
108-
| ------------------------------------------- | -------------------------------------------------- |
109-
| [](api/selection_getfocusedcell_method.md) | @getshort(api/selection_getfocusedcell_method.md) |
110-
| [](api/selection_getselectedcell_method.md) | @getshort(api/selection_getselectedcell_method.md) |
111-
| [](api/selection_setfocusedcell_method.md) | @getshort(api/selection_setfocusedcell_method.md) |
112-
| [](api/selection_setselectedcell_method.md) | @getshort(api/selection_setselectedcell_method.md) |
115+
| Name | Description |
116+
| :--------------------------------------------- | :---------------------------------------------------- |
117+
| [](api/selection_getfocusedcell_method.md) | @getshort(api/selection_getfocusedcell_method.md) |
118+
| [](api/selection_getselectedcell_method.md) | @getshort(api/selection_getselectedcell_method.md) |
119+
| [](api/selection_removeselectedcell_method.md) | @getshort(api/selection_removeselectedcell_method.md) |
120+
| [](api/selection_setfocusedcell_method.md) | @getshort(api/selection_setfocusedcell_method.md) |
121+
| [](api/selection_setselectedcell_method.md) | @getshort(api/selection_setselectedcell_method.md) |
113122

114123
## Events Bus methods
115124

docs/api/eventsbus_detach_method.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,45 @@ description: You can learn about the detach events bus method in the documentati
66

77
# detach()
88

9-
@short: detaches a handler from an event (which was attached before by the on() method)
9+
### Description
1010

11-
@signature: {`detach(name: string): void;`}
11+
@short: Detaches a handler from an event (which was attached before by the on() method)
1212

13-
@params:
14-
- `name: string` - the name of event to detach
13+
### Usage
14+
15+
~~~jsx
16+
detach(name: string): void;
17+
~~~
18+
19+
### Parameters
20+
21+
- `name` - (required) the name of event to detach
22+
23+
### Example
24+
25+
~~~jsx {9}
26+
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
27+
// config parameters
28+
});
1529

16-
@example:
1730
spreadsheet.events.on("StyleChange", function(id){
1831
console.log("The style of cell "+spreadsheet.selection.get()+" is changed");
1932
});
2033

2134
spreadsheet.events.detach("StyleChange");
35+
~~~
2236

23-
@descr:
24-
37+
:::info
2538
By default **detach()** removes all event handlers from the target event. You can detach particular event handlers by using the context marker.
39+
:::
2640

27-
~~~js
28-
var marker = "any"; // you can use any string|object value
41+
~~~jsx
42+
const marker = "any"; // you can use any string|object value
2943

3044
spreadsheet.events.on("StyleChange", handler1);
3145
spreadsheet.events.on("StyleChange", handler2, marker);
3246
// the next command will delete only handler2
3347
spreadsheet.events.detach("StyleChange", marker);
3448
~~~
3549

36-
**Related articles**
37-
38-
[Event Handling](handling_events.md)
50+
**Related articles:** [Event Handling](handling_events.md)

docs/api/eventsbus_fire_method.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,41 @@ description: You can learn about the fire events bus method in the documentation
66

77
# fire()
88

9-
@short: triggers an inner event
9+
### Description
1010

11-
@signature: {`fire(name: string, arguments: any[]): boolean;`}
11+
@short: Triggers an inner event
1212

13-
@params:
14-
- `name: string` - the event's name, case-insensitive
15-
- `arguments: array` - an array of the event-related data
13+
:::info
14+
Normally, events are called automatically and you don't need to use this method.
15+
:::
1616

17-
@returns:
18-
*False*, if some of the event handlers return *false*. Otherwise, *true*.
17+
### Usage
1918

20-
@example:
21-
spreadsheet.events.on("CustomEvent", function(param1, param2){
22-
return true;
23-
});
19+
~~~jsx
20+
fire(name: string, arguments: array): boolean;
21+
~~~
2422

25-
var res = spreadsheet.events.fire("CustomEvent", [12, "abc"]);
23+
### Parameters
2624

27-
@descr:
25+
- `name` - (required) the event's name, case-insensitive
26+
- `arguments` - (required) an array of the event-related data
2827

29-
Normally, events are called automatically and you don't need to use this method.
28+
### Returns
29+
30+
The method returns `false`, if some of the event handlers return `false`. Otherwise, `true`
31+
32+
### Example
33+
34+
~~~jsx {9}
35+
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
36+
// config parameters
37+
});
38+
39+
spreadsheet.events.on("CustomEvent", function(param1, param2){
40+
return true;
41+
});
3042

31-
**Related articles**
43+
const res = spreadsheet.events.fire("CustomEvent", [12, "abc"]);
44+
~~~
3245

33-
[Event Handling](handling_events.md)
46+
**Related articles:** [Event Handling](handling_events.md)

docs/api/eventsbus_on_method.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,39 @@ description: You can learn about the on events bus method in the documentation o
66

77
# on()
88

9-
@short: attaches a handler to an inner event of Spreadsheet
9+
### Description
1010

11-
@signature: {`on(name: string, callback: Function): void;`}
11+
@short: Attaches a handler to an inner event of Spreadsheet
1212

13-
@params:
14-
- `name: string` - the event's name, case-insensitive
15-
- `callback: function` - the handler function
13+
### Usage
14+
15+
~~~jsx
16+
on(name: string, callback: function): void;
17+
~~~
18+
19+
### Parameters
20+
21+
- `name` - (required) the event's name, case-insensitive
22+
- `callback` - (required) the handler function
23+
24+
### Example
25+
26+
~~~jsx {5-7}
27+
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
28+
// config parameters
29+
});
1630

17-
@example:
1831
spreadsheet.events.on("StyleChange", function(id){
1932
console.log("The style of cell "+spreadsheet.selection.get()+" is changed");
2033
});
34+
~~~
2135

22-
@relatedsample:
23-
**Related sample**: [Spreadsheet. Events](https://snippet.dhtmlx.com/2vkjyvsi)
24-
25-
@descr:
26-
27-
[See the list of Spreadsheet events](api/api_overview.md/#spreadsheet-events).
36+
:::info
37+
See the full list of the Spreadsheet events [here](api/api_overview.md/#spreadsheet-events).
2838

2939
You can attach several handlers to the same event and all of them will be executed. If some of handlers return *false*, the related operations will be blocked. Event handlers are processed in the same order that they are attached.
40+
:::
3041

31-
**Related articles**
42+
**Related articles:** [Event Handling](handling_events.md)
3243

33-
[Event Handling](handling_events.md)
44+
**Related sample:** [Spreadsheet. Events](https://snippet.dhtmlx.com/2vkjyvsi)

docs/api/export_xlsx_method.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,34 @@ description: You can learn about the xlsx export method in the documentation of
66

77
# xlsx()
88

9-
@short: exports data from a spreadsheet into an Excel (.xlsx) file
9+
### Description
1010

11-
@signature: xlsx(): void;
11+
@short: Exports data from a spreadsheet into an Excel (.xlsx) file
1212

13-
@example:
14-
spreadsheet.export.xlsx();
13+
### Usage
14+
15+
~~~jsx
16+
xlsx(): void;
17+
~~~
1518

16-
@relatedsample:
17-
**Related sample**: [Spreadsheet. Export Xlsx](https://snippet.dhtmlx.com/btyo3j8s)
19+
### Example
1820

19-
@descr:
21+
~~~jsx {5}
22+
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
23+
// config parameters
24+
});
25+
// exports data from a spreadsheet into an Excel
26+
spreadsheet.export.xlsx();
27+
~~~
2028

21-
{{note Please note that the component supports export to Excel files with the **.xlsx** extension only. }}
29+
:::note
30+
Please note that the component supports export to Excel files with the **.xlsx** extension only.
31+
:::
2232

33+
:::info
2334
DHTMLX Spreadsheet uses the WebAssembly-based library [Json2Excel](https://github.com/dhtmlx/json2excel) for import of data from Excel. [Check the details](loading_data.md#exporting-data).
35+
:::
2436

25-
**Related articles**
37+
**Related articles:** [Data loading and export](loading_data.md)
2638

27-
[Data loading and export](loading_data.md)
39+
**Related sample:** [Spreadsheet. Export Xlsx](https://snippet.dhtmlx.com/btyo3j8s)

0 commit comments

Comments
 (0)