You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/rich-text-editor/tools/audio.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -49,20 +49,6 @@ In the audio dialog, using the `browse` option, select the audio from the local
49
49
50
50
If the path field is not specified in the [RichTextEditorAudioSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorAudioSettings.html), the audio will be converted into `Blob` url or `Base64` and inserted inside the Rich Text Editor.
51
51
52
-
### Restrict audio upload based on size
53
-
54
-
Using the Rich Text Editor `FileUploading` event, you can restrict the audio to upload when the given audio size is greater than the allowed fileSize. Also, the audio size in the argument will be returned in `bytes`.
55
-
56
-
In the following illustration, the audio size has been validated before uploading, and it is determined whether the audio has been uploaded or not.
The selected audio can be uploaded to the required destination using the controller action below. Map this method name in [RichTextEditorMediaSettings.SaveUrl](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorMediaSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorMediaSettings_SaveUrl) and provide the required destination path through [RichTextEditorMediaSettings.Path](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorMediaSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorMediaSettings_Path) properties.
@@ -165,6 +151,20 @@ N> By default, the files are saved in the `Blob` format.
165
151
166
152
```
167
153
154
+
## Maximum file size restriction
155
+
156
+
By using the Rich Text Editor's [RichTextEditorAudioSettings.MaxFileSize](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorAudioSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorAudioSettings_MaxFileSize) property, you can restrict the audio to upload when the given audio size is greater than the allowed fileSize.
157
+
158
+
In the following illustration, the audio size has been validated before uploading, and it is determined whether the audio has been uploaded or not.
Once an audio file has been inserted, you can change it using the Rich Text Editor [RichTextEditorQuickToolbarSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorQuickToolbarSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorQuickToolbarSettings_Audio) “Replace” option. You can replace the audio file using the web URL or the browse option in the audio dialog.
Copy file name to clipboardExpand all lines: blazor/rich-text-editor/tools/insert-image.md
+43-31Lines changed: 43 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -29,37 +29,6 @@ The image has been loaded from the local machine and it will be saved in the giv
29
29
```
30
30
N> If you want to insert many tiny images in the editor and don't want a specific physical location for saving images, opt to save the format as `Base64`.
31
31
32
-
### Restrict image upload based on size
33
-
34
-
By using the Rich Text Editor's [RichTextEditorEvents.OnImageUploading](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorEvents.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorEvents_OnImageUploadSuccess) event, you can get the image size before uploading and restrict the image to upload when the given image size is greater than the allowed size.
35
-
36
-
In the following code, the image size has been validated before uploading and it has been determined whether the image has been uploaded or not.
N> You can't restrict while uploading an image as a hyperlink in the insert image dialog. When inserting images using the link, the editor does not allow you to limit the image size. You could not identify the image file size when the image was provided as a link.
63
32
64
33
### Server side action
65
34
@@ -252,6 +221,49 @@ By default, the Rich Text Editor inserts the images in [Blob](https://help.syncf
252
221
{% endhighlight %}
253
222
{% endtabs %}
254
223
224
+
## Maximum file size restriction
225
+
226
+
By using the Rich Text Editor's [RichTextEditorImageSettings.MaxFileSize](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorImageSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorImageSettings_MaxFileSize) property, you can get the image size before uploading and restrict the image to upload when the given image size is greater than the allowed size.
227
+
228
+
In the following code, the image size has been validated before uploading and it has been determined whether the image has been uploaded or not.
private List<ToolbarItemModel> Items = new List<ToolbarItemModel>()
241
+
{
242
+
new ToolbarItemModel() { Command = ToolbarCommand.Image },
243
+
new ToolbarItemModel() { Command = ToolbarCommand.Bold },
244
+
new ToolbarItemModel() { Command = ToolbarCommand.Italic },
245
+
new ToolbarItemModel() { Command = ToolbarCommand.Underline },
246
+
new ToolbarItemModel() { Command = ToolbarCommand.Separator },
247
+
new ToolbarItemModel() { Command = ToolbarCommand.Formats },
248
+
new ToolbarItemModel() { Command = ToolbarCommand.Alignments },
249
+
new ToolbarItemModel() { Command = ToolbarCommand.OrderedList },
250
+
new ToolbarItemModel() { Command = ToolbarCommand.UnorderedList },
251
+
new ToolbarItemModel() { Command = ToolbarCommand.Separator },
252
+
new ToolbarItemModel() { Command = ToolbarCommand.CreateLink },
253
+
new ToolbarItemModel() { Command = ToolbarCommand.CreateTable },
254
+
new ToolbarItemModel() { Command = ToolbarCommand.Separator },
255
+
new ToolbarItemModel() { Command = ToolbarCommand.SourceCode },
256
+
new ToolbarItemModel() { Command = ToolbarCommand.Separator },
257
+
new ToolbarItemModel() { Command = ToolbarCommand.Undo },
258
+
new ToolbarItemModel() { Command = ToolbarCommand.Redo }
259
+
};
260
+
}
261
+
262
+
{% endhighlight %}
263
+
{% endtabs %}
264
+
265
+
N> You can't restrict while uploading an image as a hyperlink in the insert image dialog. When inserting images using the link, the editor does not allow you to limit the image size. You could not identify the image file size when the image was provided as a link.
266
+
255
267
## Delete image
256
268
257
269
To remove an image from the Rich Text Editor content, select the image and click the `Remove` tool from the quick toolbar. It will delete the image from the Rich Text Editor content.
Copy file name to clipboardExpand all lines: blazor/rich-text-editor/tools/video.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -57,20 +57,6 @@ In the video dialog, by using the `browse` option, select the video from the loc
57
57
58
58
If the path field is not specified in the [RichTextEditorVideoSettings]https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorVideoSettings.html), the video will be converted into `Blob` url or `Base64` and inserted inside the Rich Text Editor.
59
59
60
-
### Restrict video upload based on size
61
-
62
-
Using the Rich Text Editor `FileUploading` event, you can restrict the video to upload when the given video size is greater than the allowed fileSize. Also, the video size in the argument will be returned in `bytes`.
63
-
64
-
In the following example, the video size has been validated before uploading and determined whether the video has been uploaded or not.
The selected video can be uploaded to the required destination using the controller action below. Map this method name in [RichTextEditorMediaSettings.SaveUrl](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorMediaSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorMediaSettings_SaveUrl) and provide required destination path through [RichTextEditorMediaSettings.Path](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorMediaSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorMediaSettings_Path) properties.
@@ -177,6 +163,20 @@ N> By default, the files are saved in the `Blob` format.
177
163
178
164
```
179
165
166
+
## Maximum file size restriction
167
+
168
+
By using the Rich Text Editor's [RichTextEditorVideoSettings.MaxFileSize](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorVideoSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorVideoSettings_MaxFileSize) property, you can restrict the video to upload when the given video size is greater than the allowed fileSize.
169
+
170
+
In the following example, the video size has been validated before uploading and determined whether the video has been uploaded or not.
Once a video file has been inserted, replace it using the Rich Text Editor [RichTextEditorQuickToolbarSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorQuickToolbarSettings.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorQuickToolbarSettings_Audio)`Replace` option. Replace the video file either by using the embedded URL or the web URL and the browse option in the video dialog.
0 commit comments