Skip to content

Commit 1cb80ab

Browse files
Integrated latest changes at 07-04-2025 7:30:22 PM
1 parent ea24eb6 commit 1cb80ab

File tree

234 files changed

+2122
-1737
lines changed

Some content is hidden

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

234 files changed

+2122
-1737
lines changed

ej2-react/block-editor/appearance.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,34 @@ The Block Editor component provides various appearance customization options to
1616

1717
You can specify the width and height for the Block Editor control using the [width](../api/blockeditor/#width) and [height](../api/blockeditor/#height) properties.
1818

19+
{% raw %}
1920
```typescript
2021
<BlockEditorComponent width="100%" height="80vh"></BlockEditorComponent>
2122

2223
// Or with specific pixel values
2324
<BlockEditorComponent width="800px" height="500px"></BlockEditorComponent>
2425
```
26+
{% endraw %}
2527

2628
## Setting readonly mode
2729

2830
You can utilize the [readonly](../api/blockeditor/#readonly) property to control whether the editor is in read-only mode. When set to `true`, users cannot edit the content but can still view it.
2931

32+
{% raw %}
3033
```typescript
3134
<BlockEditorComponent readonly={true}></BlockEditorComponent>
3235
```
36+
{% endraw %}
3337

3438
## Customization using CSS Class
3539

3640
You can use the [cssClass](../api/blockeditor/#cssclass) property to customize the appearance of the Block Editor control.
3741

42+
{% raw %}
3843
```typescript
3944
<BlockEditorComponent width="600px" height="400px" cssClass="custom-editor-theme"></BlockEditorComponent>
4045
```
46+
{% endraw %}
4147

4248
Below example demonstrates the usage of readonly and cssClass properties.
4349

ej2-react/block-editor/events.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,118 +16,148 @@ The Block Editor component provides a comprehensive set of events that allow you
1616

1717
The [created](../api/blockeditor/#created) event is triggered when the Block Editor component is successfully initialized and ready for use. This event is useful for performing setup operations or initializing additional features after the editor is created.
1818

19+
{% raw %}
1920
```typescript
2021
<BlockEditorComponent created={handleCreated}></BlockEditorComponent>
2122
```
23+
{% endraw %}
2224

2325
## ContentChanged
2426

2527
The [contentChanged](../api/blockeditor/#contentchanged) event is triggered whenever the content within the editor is modified. This includes content additions, deletions, or any structural modifications to the document.
2628

29+
{% raw %}
2730
```typescript
2831
<BlockEditorComponent contentChanged={handleContentChanged}></BlockEditorComponent>
2932
```
33+
{% endraw %}
3034

3135
## SelectionChanged
3236

3337
The [selectionChanged](../api/blockeditor/#selectionchanged) event is triggered when the user's text selection changes within the editor. This can be useful for updating UI elements based on the current selection.
3438

39+
{% raw %}
3540
```typescript
3641
<BlockEditorComponent selectionChanged={handleSelectionChanged}></BlockEditorComponent>
3742
```
43+
{% endraw %}
3844

3945
## UndoRedoPerformed
4046

4147
The [undoRedoPerformed](../api/blockeditor/#undoredoperformed) event is triggered when an undo or redo operation is executed. This event provides information about the action performed and the state before and after the operation.
4248

49+
{% raw %}
4350
```typescript
4451
<BlockEditorComponent undoRedoPerformed={handleUndoRedoPerformed}></BlockEditorComponent>
4552
```
53+
{% endraw %}
4654

4755
## BlockAdded
4856

4957
The [blockAdded](../api/blockeditor/#blockadded) event is triggered when a new block is added to the editor. This includes blocks added through user interaction, paste operations, or programmatic insertion.
5058

59+
{% raw %}
5160
```typescript
5261
<BlockEditorComponent blockAdded={handleBlockAdded}></BlockEditorComponent>
5362
```
63+
{% endraw %}
5464

5565
## BlockRemoved
5666

5767
The [blockRemoved](../api/blockeditor/#blockremoved) event is triggered when a block is removed from the editor. This can occur through user deletion, cut operations, or programmatic removal.
5868

69+
{% raw %}
5970
```typescript
6071
<BlockEditorComponent blockRemoved={handleBlockRemoved}></BlockEditorComponent>
6172
```
73+
{% endraw %}
6274

6375
## BlockMoved
6476

6577
The [blockMoved](../api/blockeditor/#blockmoved) event is triggered when blocks are moved from one position to another within the editor. This includes drag-and-drop operations, through keyboard shortcuts or programmatic block reordering.
6678

79+
{% raw %}
6780
```typescript
6881
<BlockEditorComponent blockMoved={handleBlockMoved}></BlockEditorComponent>
6982
```
83+
{% endraw %}
7084

7185
## BlockDragStart
7286

7387
The [blockDragStart](../api/blockeditor/#blockdragstart) event is triggered at the beginning of a block drag operation, providing information about the blocks being dragged and their initial position.
7488

89+
{% raw %}
7590
```typescript
7691
<BlockEditorComponent blockDragStart={handleBlockDragStart}></BlockEditorComponent>
7792
```
93+
{% endraw %}
7894

7995
## BlockDrag
8096

8197
The [blockDrag](../api/blockeditor/#blockdrag) event is triggered during a drag operation, providing information about the blocks being dragged and their current position.
8298

99+
{% raw %}
83100
```typescript
84101
<BlockEditorComponent blockDrag={handleBlockDrag}></BlockEditorComponent>
85102
```
103+
{% endraw %}
86104

87105
## BlockDrop
88106

89107
The [blockDrop](../api/blockeditor/#blockdrop) event is triggered when blocks are successfully dropped at their destination during a drag-and-drop operation.
90108

109+
{% raw %}
91110
```typescript
92111
<BlockEditorComponent blockDrop={handleBlockDrop}></BlockEditorComponent>
93112
```
113+
{% endraw %}
94114

95115
## Focus
96116

97117
The [focus](../api/blockeditor/#focus) event is triggered when the editor gains focus. This is useful for updating UI states and managing editor interactions.
98118

119+
{% raw %}
99120
```typescript
100121
<BlockEditorComponent focus={handleFocus}></BlockEditorComponent>
101122
```
123+
{% endraw %}
102124

103125
## Blur
104126

105127
The [blur](../api/blockeditor/#blur) event is triggered when the editor loses focus. This is commonly used for auto-saving content or hiding UI elements.
106128

129+
{% raw %}
107130
```typescript
108131
<BlockEditorComponent blur={handleBlur}></BlockEditorComponent>
109132
```
133+
{% endraw %}
110134

111135
## KeyActionExecuted
112136

113137
The [keyActionExecuted](../api/blockeditor/#keyactionexecuted) event is triggered when a keyboard shortcut is executed. This provides information about the key combination used and the corresponding action performed.
114138

139+
{% raw %}
115140
```typescript
116141
<BlockEditorComponent keyActionExecuted={handleKeyActionExecuted}></BlockEditorComponent>
117142
```
143+
{% endraw %}
118144

119145
## BeforePaste
120146

121147
The [beforePaste](../api/blockeditor/#beforepaste) event is triggered before content is pasted into the editor. This event allows you to modify or cancel the paste operation.
122148

149+
{% raw %}
123150
```typescript
124151
<BlockEditorComponent beforePaste={handleBeforePaste}></BlockEditorComponent>
125152
```
153+
{% endraw %}
126154

127155
## AfterPaste
128156

129157
The [afterPaste](../api/blockeditor/#afterpaste) event is triggered after content has been successfully pasted into the editor. This is useful for post-processing pasted content or updating related UI elements.
130158

159+
{% raw %}
131160
```typescript
132161
<BlockEditorComponent afterPaste={handleAfterPaste}></BlockEditorComponent>
133-
```
162+
```
163+
{% endraw %}

ej2-react/block-editor/getting-started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Now, you can start adding Block Editor component in the application. For getting
7171

7272
`[Class-component]`
7373

74+
{% raw %}
7475
```ts
7576

7677
import { BlockEditorComponent } from '@syncfusion/ej2-react-blockeditor';
@@ -88,9 +89,11 @@ export default class App extends React.Component<{}, {}> {
8889

8990
ReactDOM.render(<App />, document.getElementById('blockeditor'));
9091
```
92+
{% endraw %}
9193

9294
`[Functional-component]`
9395

96+
{% raw %}
9497
```ts
9598
import { BlockEditorComponent } from '@syncfusion/ej2-react-blockeditor';
9699
import * as React from 'react';
@@ -105,6 +108,7 @@ function App() {
105108

106109
ReactDOM.render(<App />, document.getElementById('blockeditor'));
107110
```
111+
{% endraw %}
108112

109113
## Adding CSS Reference
110114

ej2-react/block-editor/keyboard-shortcuts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ For other operations, you can customize the keyboard shortcuts by configuring th
7979

8080
In the below example, the shortcut for bold formatting is changed to <kbd>Alt</kbd> + <kbd>B</kbd> and for italic formatting to <kbd>Alt</kbd> + <kbd>I</kbd>.
8181

82+
{% raw %}
8283
```typescript
8384
<BlockEditorComponent keyConfig={{ bold: 'alt+b', italic: 'alt+i' }}></BlockEditorComponent>
84-
```
85+
```
86+
{% endraw %}

0 commit comments

Comments
 (0)