diff --git a/blazor/document-editor/how-to/customize-color-picker.md b/blazor/document-editor/how-to/customize-color-picker.md index 03b64522ed..f76e6998ba 100644 --- a/blazor/document-editor/how-to/customize-color-picker.md +++ b/blazor/document-editor/how-to/customize-color-picker.md @@ -37,3 +37,6 @@ The following table illustrates all the possible properties for the color picker | Mode | It is used to render the ColorPicker with the specified mode. Defaults to ‘Picker’ | | ModeSwitcher | It is used to show / hide the mode switcher button of ColorPicker component. Defaults to true | | ShowButtons | It is used to show / hide the control buttons (apply / cancel) of ColorPicker component. Defaults to true | + + +>**Note**: According to the Word document specifications, it is not possible to modify the **`Predefined Highlight colors`**. This limitation means that the range of highlight colors provided by default cannot be customized or expanded upon by the user to suit individual preferences. Consequently, users must work within the confines of the existing color palette, as no functionality currently exists to modify or personalize these predefined highlighting options. \ No newline at end of file diff --git a/blazor/document-editor/how-to/get-current-word.md b/blazor/document-editor/how-to/get-current-word.md index af96b5cde5..146949ecb4 100644 --- a/blazor/document-editor/how-to/get-current-word.md +++ b/blazor/document-editor/how-to/get-current-word.md @@ -13,7 +13,9 @@ You can get the current word or paragraph content from the Blazor Document Edito ## Select and get the word in current cursor position -You can use [`SelectCurrentWordAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectCurrentWordAsync_System_Boolean_) API in selection module to select the current word at cursor position and use [`GetTextAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetTextAsync) API to get the selected content as plain text from Blazor Document Editor component. +You can use [`SelectCurrentWordAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectCurrentWordAsync_System_Boolean_) API in selection module to select the current word at cursor position. +* use [`GetTextAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetTextAsync) API to get the selected content as **plain text** from Blazor Document Editor component. +* use [`GetSfdtAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetSfdtAsync) API to get the selected content as **SFDT text** from Blazor Document Editor component. The following example code illustrates how to select and get the current word as plain text. @@ -34,7 +36,9 @@ The following example code illustrates how to select and get the current word as // To select the current word in document await container.DocumentEditor.Selection.SelectCurrentWordAsync(); // To get the selected content as text - string selectedContent = await container.DocumentEditor.Selection.GetTextAsync(); + string selectedContentText = await container.DocumentEditor.Selection.GetTextAsync(); + // To get the selected content as SFDT (rich text) + string selectedContentSFDT = await container.DocumentEditor.Selection.GetSfdtAsync(); } } ``` @@ -43,7 +47,10 @@ To get the bookmark content as SFDT (rich text), check this [`link`](../../docum ## Select and get the paragraph in current cursor position -You can use [`SelectParagraphAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectParagraphAsync) API in selection module to select the current paragraph at cursor position and use [`GetTextAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetTextAsync) API or [`GetSfdtAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetSfdtAsync) API to get the selected content as plain text or SFDT from Blazor Document Editor component. +You can use [`SelectParagraphAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectParagraphAsync) API in selection module to select the current paragraph at cursor position. + +* use [`GetTextAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetTextAsync) API to get the selected content as **plain text** from Blazor Document Editor component. +* use [`GetSfdtAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetSfdtAsync) API to get the selected content as **SFDT text** from Blazor Document Editor component. The following example code illustrates how to select and get the current paragraph as SFDT. @@ -63,8 +70,10 @@ The following example code illustrates how to select and get the current paragra await container.DocumentEditor.Editor.InsertTextAsync("Document editor"); // To select the current paragraph in document await container.DocumentEditor.Selection.SelectParagraphAsync(); - // To get the selected content as SFDT - string selectedContent = await container.DocumentEditor.Selection.GetSfdtAsync(); + // To get the selected content as text + string selectedContentText = await container.DocumentEditor.Selection.GetTextAsync(); + // To get the selected content as SFDT (rich text) + string selectedContentSFDT = await container.DocumentEditor.Selection.GetSfdtAsync(); } } ``` \ No newline at end of file diff --git a/blazor/document-editor/images/Column_Limit_Alert.png b/blazor/document-editor/images/Column_Limit_Alert.png new file mode 100644 index 0000000000..4dd175bb1a Binary files /dev/null and b/blazor/document-editor/images/Column_Limit_Alert.png differ diff --git a/blazor/document-editor/images/Row_Limit_Alert.png b/blazor/document-editor/images/Row_Limit_Alert.png new file mode 100644 index 0000000000..ddc681510f Binary files /dev/null and b/blazor/document-editor/images/Row_Limit_Alert.png differ diff --git a/blazor/document-editor/table.md b/blazor/document-editor/table.md index a8c5297346..78c35d929a 100644 --- a/blazor/document-editor/table.md +++ b/blazor/document-editor/table.md @@ -21,7 +21,51 @@ Refer to the following sample code. await documentEditor.Editor.InsertTableAsync(3, 3); ``` -The maximum size of row and column is limited to 32767 and 63 respectively. +## Set the maximum number of rows when inserting a table + +You can use the [maximumRows](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.DocumentEditorSettingsModel.html#Syncfusion_Blazor_DocumentEditor_DocumentEditorSettingsModel_MaximumRows) property to set the maximum number of rows allowed while inserting a table in the Document Editor component. + + +Refer to the following sample code. + +```csharp + + + +@code { + SfDocumentEditorContainer container; + DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel() { MaximumRows = 4 }; +}; +``` + +When the maximum row limit is reached, an alert will appear, as follow + +![Row Limit Alert](images/Row_Limit_Alert.PNG) + +>Note: The maximum value of Row is 32767, as per Microsoft Word application and you can set any value less than or equal to 32767 to this property. +## Set the maximum number of Columns when inserting a table + + +You can use the [maximumColumns](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.DocumentEditorSettingsModel.html#Syncfusion_Blazor_DocumentEditor_DocumentEditorSettingsModel_MaximumColumns) property to set the maximum number of columns allowed while inserting a table in the Document Editor component. + + +Refer to the following sample code. + +```csharp + + + +@code { + SfDocumentEditorContainer container; + DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel() { MaximumColumns = 4 }; +}; +``` + +When the maximum column limit is reached, an alert will appear, as follow + +![Column Limit Alert](images/Column_Limit_Alert.PNG) + +>Note: The maximum value of Column is 63, as per Microsoft Word application and you can set any value less than or equal to 63 to this property. ## Insert rows