Skip to content

Commit e615e72

Browse files
998697: Core/MVC UG content additions, refinement and corrections
1 parent 6d69aa0 commit e615e72

36 files changed

+527
-1346
lines changed

ej2-asp-core-mvc/block-editor/EJ2_ASP.MVC/appearance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: post
33
title: Appearance in ##Platform_Name## Block Editor Control | Syncfusion
44
description: Checkout and learn about appearance with Syncfusion Essential ##Platform_Name## BlockEditor control, its elements, and more details.
55
platform: ej2-asp-core-mvc
6-
control: Block Editor
6+
control: BlockEditor
77
publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
@@ -31,7 +31,7 @@ You can specify the width and height for the Block Editor control using the [Wid
3131

3232
## Setting readonly mode
3333

34-
You can utilize the [Readonly](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.BlockEditor.html#Syncfusion_EJ2_BlockEditor_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.
34+
You can utilize the [ReadOnly](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.BlockEditor.html#Syncfusion_EJ2_BlockEditor_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.
3535

3636
```cshtml
3737

ej2-asp-core-mvc/block-editor/EJ2_ASP.MVC/built-in-blocks/built-in-blocks.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: post
33
title: Blocks in ##Platform_Name## Block Editor control | Syncfusion
44
description: Checkout and learn about Blocks with ##Platform_Name## Block Editor control of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
6-
control: Block Editor
6+
control: BlockEditor
77
publishingplatform: ##Platform_Name##
88
documentation: ug
99
domainurl: ##DomainURL##
@@ -15,9 +15,9 @@ The Block Editor control enables you to create block-based content editing solut
1515

1616
## Blocks
1717

18-
Blocks are the fundamental building elements of the Block Editor. Each block represents a distinct content unit such as a `paragraph`, `heading`, `list`, or specialized content like `code snippets` or `images`. The Block Editor organizes content as a collection of `blocks`, allowing for better structure and formatting options.
18+
Blocks are the fundamental building elements of the Block Editor. Each block represents a distinct content unit such as a `Paragraph`, `Heading`, `List`, or specialized content like `Code Snippets` or `Images`. The Block Editor organizes content as a collection of `blocks`, allowing for better structure and formatting options.
1919

20-
You can configure blocks with various properties such as [Id](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Id), [Type](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Type), [Content](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Content), [Children](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Children) and more to create rich, structured editor.
20+
You can configure blocks with various properties such as `id`, `blockType`, `content` and more to create rich and structured editor.
2121

2222
## Block types
2323

@@ -40,9 +40,9 @@ The Block Editor supports multiple block types. Each block type offers different
4040

4141
## Configure indent
4242

43-
You can specify the indentation level of a block using the [Indent](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Indent) property. This property accepts a numeric value that determines how deeply a block is nested from the left margin.
43+
You can specify the indentation level of a block using the `indent` property. This property accepts a numeric value that determines how deeply a block is nested from the left margin.
4444

45-
By default, the [Indent](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Indent) property is set to `0`.
45+
By default, the `indent` property is set to `0`.
4646

4747
{% tabs %}
4848
{% highlight razor tabtitle="CSHTML" %}
@@ -57,7 +57,7 @@ By default, the [Indent](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion
5757

5858
## Configure CSS Class
5959

60-
You can apply custom styling to individual blocks using the [CssClass](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_CssClass) property. This property accepts a string containing one or more CSS class names.
60+
You can apply custom styling to individual blocks using the `cssClass` property. This property accepts a string containing one or more CSS class names.
6161

6262
Custom CSS classes allow you to define specialized styling for specific blocks in your editor.
6363

@@ -74,7 +74,7 @@ Custom CSS classes allow you to define specialized styling for specific blocks i
7474

7575
## Configure templates
7676

77-
The Block Editor allows you to use custom templates for specialized content using the [Template](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html#Syncfusion_EJ2_BlockEditor_Block_Template) property. Templates can be defined as strings, functions, or HTML elements.
77+
The Block Editor allows you to use custom templates for specialized content using the `template` property. Templates can be defined as strings, functions, or HTML elements.
7878

7979
{% tabs %}
8080
{% highlight razor tabtitle="CSHTML" %}

ej2-asp-core-mvc/block-editor/EJ2_ASP.MVC/built-in-blocks/code-block.md

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,40 @@ layout: post
33
title: Code Block in ##Platform_Name## Block Editor control | Syncfusion
44
description: Checkout and learn about Code Block with ##Platform_Name## Block Editor control of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
6-
control: Block Editor
6+
control: BlockEditor
77
publishingplatform: ##Platform_Name##
88
documentation: ug
99
domainurl: ##DomainURL##
1010
---
1111

1212
# Code Blocks in ##Platform_Name## Block Editor control
1313

14-
You can render Code blocks by setting the [Type](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.BlockType.html) property as `Code`. By setting the `Props` property, you can configure the languages available for syntax highlighting and the default language. The default language is `javascript`.
14+
You can render Code blocks by setting the `blockType` property as `Code`. By setting the `properties` property, you can configure the default language. The default language is `plainText`.
1515

16-
## Configure code properties
16+
## Global Code Settings
1717

18-
For Code blocks, you can configure syntax highlighting and language options using the [Props](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html) property.
18+
You can configure global settings for code blocks using the `CodeBlockSettings` property in the Block Editor root configuration. This ensures consistent behavior for syntax highlighting and language options across all code blocks.
1919

20-
The code [Props](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html) property supports the following options:
20+
The `CodeBlockSettings` property supports the following options:
2121

2222
| Property | Description | Default Value |
2323
|----------|-------------|---------------|
24-
| languages | Array of language options for syntax highlighting | [] |
25-
| defaultLanguage | The default language to use for syntax highlighting | 'javascript' |
24+
| [languages](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.CodeBlockSettingsModel.html#Syncfusion_EJ2_BlockEditor_CodeBlockSettingsModel_Languages) | Specifies the array of language options for syntax highlighting. | [] |
25+
| [defaultLanguage](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.CodeBlockSettingsModel.html#Syncfusion_EJ2_BlockEditor_CodeBlockSettingsModel_DefaultLanguage) | Defines the default language to use for syntax highlighting. | 'plaintext' |
2626

2727
Each language object in the `languages` array should have:
2828
- `language`: The language value used for syntax highlighting
2929
- `label`: The display name shown in the language selector
3030

31-
### Type & Props
32-
```typescript
33-
// Adding Code block
34-
{
35-
Type = BlockType.Code,
36-
Content = new List<object>()
37-
{
38-
new
39-
{
40-
type = "Text",
41-
content = "function greeting() {\n console.log(\"Hello, world!\");\n}"
42-
}
43-
},
44-
Props = new
45-
{
46-
defaultLanguage = "javascript",
47-
languages = new List<object>()
48-
{
49-
new
50-
{
51-
label = "JavaScript",
52-
language = "javascript"
53-
},
54-
new
55-
{
56-
label = "TypeScript",
57-
language = "typescript"
58-
}
59-
}
60-
}
61-
}
62-
```
31+
## Configure code properties
32+
33+
For Individual Code blocks, you can configure default language using the `properties` property in the block model.
34+
35+
The property supports the following options:
36+
37+
| Property | Description | Default Value |
38+
|----------|-------------|---------------|
39+
| language | The default language to use for syntax highlighting | '' |
6340

6441
Below example illustrates how to render the different code block in the Block Editor.
6542

ej2-asp-core-mvc/block-editor/EJ2_ASP.MVC/built-in-blocks/embed.md

Lines changed: 29 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: post
33
title: Embed Blocks in ##Platform_Name## Block Editor control | Syncfusion
44
description: Checkout and learn about Embed Blocks with ##Platform_Name## Block Editor control of Syncfusion Essential JS 2 and more.
55
platform: ej2-javascript
6-
control: Block Editor
6+
control: BlockEditor
77
publishingplatform: ##Platform_Name##
88
documentation: ug
99
domainurl: ##DomainURL##
@@ -15,53 +15,40 @@ Block Editor supports addition of embeds to help you organize, showcase contents
1515

1616
## Image Block
1717

18-
You can use the `image` block to showcase an image content within your editor.
18+
You can use the `Image` block to showcase an image content within your editor.
1919

20-
### Configure image block
20+
### Configure Image Block
2121

22-
You can render Image blocks by setting the [Type](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.BlockType.html) property as `Image`. By setting the `Props` property, you can configure the image source, allowed file types, and display dimensions etc.
22+
You can render an `Image` block by setting the `blockType` property to `Image` in the block model. The `properties` property allows you to configure the image source, allowed file types, display dimensions, and more.
2323

24-
The image [Props](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.BlockEditor.Block.html) property supports the following options:
24+
#### Global Image Settings
25+
26+
You can configure global settings for image blocks using the `ImageBlockSettings` property in the Block Editor root configuration. This ensures consistent behavior for image uploads, resizing, and display.
27+
28+
The `ImageBlockSettings` property supports the following options:
29+
30+
| Property | Description | Default Value |
31+
|----------|-------------|---------------|
32+
| saveFormat | Specifies the format to save the image. | `Base64` |
33+
| allowedTypes | Specifies allowed image file types for upload. | `['.jpg', '.jpeg', '.png']` |
34+
| width | Specifies the default display width of the image. | `auto` |
35+
| height | Specifies the default display height of the image. | `auto` |
36+
| enableResize | Enables or disables image resizing. | `true` |
37+
| minWidth | Minimum width allowed for resizing. | `''` |
38+
| maxWidth | Maximum width allowed for resizing. | `''` |
39+
| minHeight | Minimum height allowed for resizing. | `''` |
40+
| maxHeight | Maximum height allowed for resizing. | `''` |
41+
42+
#### Configure Image Block Properties
43+
44+
The `Image` block `properties` property in the block model supports the following options:
2545

2646
| Property | Description | Default Value |
2747
|----------|-------------|---------------|
28-
| saveFormat | Specifies the format to save the image | Base64 |
29-
| src | Specifies the image path | ' '|
30-
| allowedTypes | Specifies the allowed image file types that can be uploaded | ['.jpg', '.jpeg', '.png'] |
31-
| width | Specifies the display width of the image | ' ' |
32-
| height | Specifies the display height of the image | ' '|
33-
| minWidth | Specifies the minimum width of the image in pixels or as a string unit | 40|
34-
| maxWidth | Specifies the maximum width of the image in pixels or as a string unit | ' '|
35-
| minHeight | Specifies the minimum height of the image in pixels or as a string unit | 40|
36-
| maxHeight | Specifies the maximum height of the image in pixels or as a string unit | ' '|
37-
| altText | Specifies the alternative text to be displayed when the image cannot be loaded | ' '|
38-
| cssClass | Specifies one or more CSS classes to be applied to the image element | ' ' |
39-
| readOnly | Specifies whether the image is in read-only mode | false
40-
41-
42-
### Type & Props
43-
44-
```typescript
45-
// Adding image block
46-
{
47-
Type = BlockType.Image,
48-
Props = new
49-
{
50-
src = "https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png",
51-
altText = "Sample image"
52-
saveFormat= "Base64",
53-
allowedTypes = ['.png', '.gif'],
54-
width = '200px',
55-
height = '100px',
56-
minWidth = 50,
57-
maxWidth = 500,
58-
minHeight = 50,
59-
maxHeight = 300,
60-
cssClass = 'img-custom',
61-
readOnly = true
62-
}
63-
}
64-
```
48+
| src | Specifies the image path. | `''` |
49+
| width | Specifies the display width of the image. | `''` |
50+
| height | Specifies the display height of the image. | `''` |
51+
| altText | Specifies the alternative text to display when the image cannot be loaded. | `''` |
6552

6653
The below sample demonstrates the configuration of image block in the Block Editor.
6754

0 commit comments

Comments
 (0)