Skip to content

Commit 891d95c

Browse files
Merge pull request #6 from DHTMLX/next
[update] Styling changes and broken links
2 parents c954a26 + bf98451 commit 891d95c

File tree

64 files changed

+542
-573
lines changed

Some content is hidden

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

64 files changed

+542
-573
lines changed

docs/angular_integration.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ yarn add "./spreadsheet_5.1.0_enterprise"
7777

7878
You can install the **trial** version of Spreadsheet using **npm** or **yarn** commands:
7979

80-
~~~js {2,3,6,7}
80+
~~~jsx {2,3,6,7}
8181
// npm
8282
npm config set @dhx:registry https://npm.dhtmlx.com
8383
npm i @dhx/trial-spreadsheet
@@ -119,7 +119,7 @@ In this tutorial we will use the **trial** version of Spreadsheet.
119119

120120
To display Spreadsheet on the page, we need to set the container to render the component inside. Use the code below:
121121

122-
~~~js title="spreadsheet.component.ts"
122+
~~~jsx title="spreadsheet.component.ts"
123123
import { Spreadsheet } from '@dhx/trial-spreadsheet';
124124
import '@dhx/trial-spreadsheet/codebase/spreadsheet.min.css';
125125
import { Component, ElementRef, OnInit, ViewChild, OnDestroy} from '@angular/core';
@@ -137,7 +137,7 @@ export class SpreadsheetComponent implements OnInit {
137137

138138
Then we need to render our Spreadsheet in the container. To do that, use the `ngOnInit()` method of Angular:
139139

140-
~~~js {6-8} title="spreadsheet.component.ts"
140+
~~~jsx {6-8} title="spreadsheet.component.ts"
141141
export class SpreadsheetComponent implements OnInit, OnDestroy {
142142
@ViewChild('spreadsheetContainer', { static: true }) spreadsheetContainer!: ElementRef;
143143

@@ -159,7 +159,7 @@ In the above code we've also specified the `ngOnDestroy()` method that contains
159159
160160
To add data into the Spreadsheet, we need to provide a data set. Let's create the **data.ts** file in the **src/app/spreadsheet/** directory and add some data into it:
161161
162-
~~~js title="data.ts"
162+
~~~jsx title="data.ts"
163163
export function getData(): any {
164164
return {
165165
styles: {
@@ -204,7 +204,7 @@ export function getData(): any {
204204
205205
Then open the ***spreadsheet.component.ts*** file. Import the file with data and add the `spreadsheet.parse();` call into the `ngOnInit()` method, as shown below. It will reload data on each applied change.
206206
207-
~~~js {2,7} title="spreadsheet.component.ts"
207+
~~~jsx {2,7} title="spreadsheet.component.ts"
208208
// importing the data file
209209
import { getData } from './data';
210210
@@ -223,7 +223,7 @@ When a user makes some action in the Spreadsheet, it invokes an event. You can u
223223
224224
Open the **spreadsheet.component.ts** file and complete the `ngOnInit()` method as in:
225225
226-
~~~js {5-7} title="spreadsheet.component.ts"
226+
~~~jsx {5-7} title="spreadsheet.component.ts"
227227
ngOnInit() {
228228
this.spreadsheet = new Spreadsheet(this.spreadsheetContainer.nativeElement,{});
229229
@@ -240,7 +240,7 @@ Replace `'ActionName'` with the actual name of the event you want to handle, and
240240
241241
Now it's time to add the component into our app. Open ***src/app/app.component.ts*** and use *SpreadsheetComponent* instead of the default content by inserting the code below:
242242
243-
~~~js title="app.component.ts"
243+
~~~jsx title="app.component.ts"
244244
import { Component } from "@angular/core";
245245
246246
@Component({
@@ -254,7 +254,7 @@ export class AppComponent {
254254
255255
Then create the ***app.module.ts*** file in the ***src/app/*** directory and insert the *SpreadsheetComponent* as provided below:
256256
257-
~~~js title="app.module.ts"
257+
~~~jsx title="app.module.ts"
258258
import { NgModule } from "@angular/core";
259259
import { BrowserModule } from "@angular/platform-browser";
260260
@@ -272,7 +272,7 @@ export class AppModule {}
272272
273273
For correct rendering of fonts, open the ***angular.json*** file and complete the "assets" array in the following way (replace *spreadsheet_package* with the name of your local folder that contains Spreadsheet source files):
274274
275-
~~~js {5-9} title="angular.json"
275+
~~~jsx {5-9} title="angular.json"
276276
...
277277
"assets": [
278278
"src/favicon.ico",
@@ -288,7 +288,7 @@ For correct rendering of fonts, open the ***angular.json*** file and complete th
288288
289289
The last step is to open the ***src/main.ts*** file and replace the existing code with the following one:
290290
291-
~~~js title="main.ts"
291+
~~~jsx title="main.ts"
292292
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
293293
import { AppModule } from "./app/app.module";
294294
platformBrowserDynamic()

docs/api/api_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: You can have an API overview of the DHTMLX JavaScript Spreadsheet l
88

99
## Constructor
1010

11-
~~~js
11+
~~~jsx
1212
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
1313
rowsCount: 20,
1414
colsCount: 20

docs/api/overview/actions_overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This section is dedicated to a new conception of interaction with Spreadsheet ev
1010

1111
Starting from v4.3, DHTMLX Spreadsheet includes a pair of the [beforeAction](api/spreadsheet_beforeaction_event.md)/[afterAction](api/spreadsheet_afteraction_event.md) events that are intended to make your code simple and concise. They will fire right before an action is executed and indicate which exactly action has been performed.
1212

13-
~~~js
13+
~~~jsx
1414
spreadsheet.events.on("beforeAction", (actionName, config) => {
1515
if (actionName === "addColumn") {
1616
console.log(actionName, config);
@@ -32,12 +32,12 @@ spreadsheet.events.on("afterAction", (actionName, config) => {
3232
>It means, that you don't have to constantly add sets of paired [**before-** and **after-**](api/overview/events_overview.md) events anymore to track and handle the actions which you execute when changing something in the spreadsheet.
3333
3434
>But if needed you can use an **old approach** because all the existing events will continue work as before:
35-
~~~js
35+
~~~jsx
3636
spreadsheet.events.on("afterColumnAdd", function(cell){
3737
console.log("A new column is added", cell);
3838
});
3939
~~~
40-
~~~js
40+
~~~jsx
4141
spreadsheet.events.on("beforeColumnAdd", function(cell){
4242
console.log("A new column will be added", cell);
4343
return true;

docs/api/spreadsheet_afterclear_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterClear event in the documentation of th
99
:::caution
1010
The **afterClear** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "clear") {
1515
console.log(actionName, config);

docs/api/spreadsheet_aftercolumnadd_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterColumnAdd event in the documentation o
99
:::caution
1010
The **afterColumnAdd** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "addColumn") {
1515
console.log(actionName, config)

docs/api/spreadsheet_aftercolumndelete_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterColumnDelete event in the documentatio
99
:::caution
1010
The **afterColumnDelete** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "deleteColumn") {
1515
console.log(actionName, config)

docs/api/spreadsheet_afterformatchange_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterFormatChange event in the documentatio
99
:::caution
1010
The **afterFormatChange** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "setCellFormat") {
1515
console.log(actionName, config);

docs/api/spreadsheet_afterrowadd_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterRowAdd event in the documentation of t
99
:::caution
1010
The **afterRowAdd** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "addRow") {
1515
console.log(actionName, config);

docs/api/spreadsheet_afterrowdelete_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterRowDelete event in the documentation o
99
:::caution
1010
The **afterRowDelete** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "deleteRow") {
1515
console.log(actionName, config);

docs/api/spreadsheet_aftersheetadd_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: You can learn about the afterSheetAdd event in the documentation of
99
:::caution
1010
The **afterSheetAdd** event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
1111

12-
~~~js
12+
~~~jsx
1313
spreadsheet.events.on("afterAction", (actionName, config) => {
1414
if (actionName === "addSheet") {
1515
console.log(actionName, config);

0 commit comments

Comments
 (0)