Skip to content

Commit 95d18e7

Browse files
Integrated latest changes at 04-30-2025 1:32:13 AM
1 parent a12bce3 commit 95d18e7

File tree

5 files changed

+103
-19
lines changed

5 files changed

+103
-19
lines changed

ej2-angular/rich-text-editor/insert-image-media/insert-images.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,92 @@ Configure [insertImageSettings.removeUrl](https://ej2.syncfusion.com/angular/doc
100100

101101
Set the [insertImageSettings.saveFormat](https://ej2.syncfusion.com/angular/documentation/api/rich-text-editor/imageSettingsModel/#saveformat) property to determine whether the image should be saved as Blob or Base64, aligning with your application's requirements.
102102

103+
```typescript
104+
105+
import { Component } from '@angular/core';
106+
import { ToolbarService, QuickToolbarService, LinkService, HtmlEditorService, ImageService,} from '@syncfusion/ej2-angular-richtexteditor';
107+
import { UploadingEventArgs } from '@syncfusion/ej2-angular-inputs';
108+
109+
@Component({
110+
selector: 'app-root',
111+
template: `<ejs-richtexteditor id='' [toolbarSettings]='toolbarSettings' [insertImageSettings] = 'insertImageSettings' >
112+
</ejs-richtexteditor>`,
113+
providers: [ ToolbarService, QuickToolbarService, LinkService, ImageService, HtmlEditorService ],
114+
})
115+
116+
export class AppComponent {
117+
public toolbarSettings: object = {
118+
items: ['Image'],
119+
};
120+
public insertImageSettings: Object = {
121+
saveUrl: "[SERVICE_HOSTED_PATH]/api/Home/SaveImage",
122+
path: "[SERVICE_HOSTED_PATH]/Uploads/"
123+
};
124+
}
125+
126+
```
127+
128+
```csharp
129+
130+
public class HomeController : Controller
131+
{
132+
private IHostingEnvironment hostingEnv;
133+
134+
public HomeController(IHostingEnvironment env)
135+
{
136+
hostingEnv = env;
137+
}
138+
139+
public IActionResult Index()
140+
{
141+
return View();
142+
}
143+
144+
[AcceptVerbs("Post")]
145+
public void SaveImage(IList<IFormFile> UploadFiles)
146+
{
147+
try
148+
{
149+
foreach (IFormFile file in UploadFiles)
150+
{
151+
if (UploadFiles != null)
152+
{
153+
string filename = ContentDispositionHeaderValue.Parse(file.ContentDisposition).FileName.Trim('"');
154+
filename = hostingEnv.WebRootPath + "\\Uploads" + $@"\{filename}";
155+
156+
// Create a new directory, if it does not exists
157+
if (!Directory.Exists(hostingEnv.WebRootPath + "\\Uploads"))
158+
{
159+
Directory.CreateDirectory(hostingEnv.WebRootPath + "\\Uploads");
160+
}
161+
162+
if (!System.IO.File.Exists(filename))
163+
{
164+
using (FileStream fs = System.IO.File.Create(filename))
165+
{
166+
file.CopyTo(fs);
167+
fs.Flush();
168+
}
169+
Response.StatusCode = 200;
170+
}
171+
}
172+
}
173+
}
174+
catch (Exception)
175+
{
176+
Response.StatusCode = 204;
177+
}
178+
}
179+
180+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
181+
public IActionResult Error()
182+
{
183+
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
184+
}
185+
}
186+
187+
```
188+
103189
### Rename images before inserting
104190

105191
You can use the [insertImageSettings](https://ej2.syncfusion.com/angular/documentation/api/rich-text-editor/#insertimagesettings) property, to specify the server handler to upload the selected image. Then by binding the [fileUploadSuccess](https://ej2.syncfusion.com/angular/documentation/api/rich-text-editor/#fileuploadsuccess) event, you can receive the modified file name from the server and update it in the Rich Text Editor's insert image dialog.

ej2-angular/rich-text-editor/insert-image-media/video.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,6 @@ Once a video file has been inserted, you can replace it using the Rich Text Edit
421421

422422
![Angular Rich Text Editor Embed Video Replace](../images/angular-richtexteditor-video-replace-embed.png)
423423

424-
![Angular Rich Text Editor Web Video Replace](../images/angular-richtexteditor-video-replace-web.png)
425-
426424
## Deleting video
427425

428426
To remove a video from the Rich Text Editor content, select the video and click the `videoRemove` button from the quick toolbar. It will delete the video from the Rich Text Editor content as well as from the service location if the [insertVideoSettings.removeUrl](https://ej2.syncfusion.com/angular/documentation/api/rich-text-editor/videoSettingsModel/#removeurl) is given.

ej2-angular/rich-text-editor/module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ domainurl: ##DomainURL##
1212

1313
The Angular Rich Text Editor component follows a modular architecture, enabling users to include or exclude features as needed to ensure optimal performance and customization.
1414

15-
## What is a Module in Angular Rich Text Editor?
15+
## What is a module in Angular Rich Text Editor?
1616

1717
In the Angular Rich Text Editor, a module refers to a self-contained feature or functionality that can be selectively enabled or disabled. These modules are provided as part of the @syncfusion/ej2-angular-richtexteditor package and can be injected to extend the editor's capabilities.
1818

1919
For example, modules such as `Toolbar`, `Link`, `Image`, `HtmlEditor`, and `QuickToolbar` enable specific tools and behavior in the Rich Text Editor interface.
2020

21-
## How to Import and Inject Modules
21+
## How to import and inject modules
2222

2323
To use a module in the Angular Rich Text Editor, you must:
2424

@@ -40,7 +40,7 @@ The following example demonstrates how to import and inject modules.
4040

4141
{% previewsample "page.domainurl/samples/rich-text-editor/module-inject" %}
4242

43-
## Available Modules in Rich Text Editor
43+
## Available modules in Rich Text Editor
4444

4545
| Module | Description |
4646
|------|-------------|

ej2-angular/rich-text-editor/smart-editing/emoji-picker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ An emoji picker is a tool designed for adding emojis or emoticons to text with e
1414

1515
## Configuring emoji picker tool in the toolbar
1616

17-
Add the `EmojiPicker` tool to the Rich Text Editor toolbar using the `toolbarSettings` [items](../api/rich-text-editor/toolbarSettings/#items) property.
17+
Add the `EmojiPicker` tool to the Rich Text Editor toolbar using the `toolbarSettings` [items](https://helpej2.syncfusion.com/angular/documentation/api/rich-text-editor/toolbarSettingsModel/#items) property.
1818

19-
By default, a predefined set of emojis is configured. However, these icons can be customized according to specific needs by using the [emojiPickerSettings](../api/rich-text-editor/richTextEditorModel/#emojiPickerSettings) property.
19+
By default, a predefined set of emojis is configured. However, these icons can be customized according to specific needs by using the [emojiPickerSettings](https://helpej2.syncfusion.com/angular/documentation/api/rich-text-editor/#emojipickersettings) property.
2020

2121
```ts
2222

@@ -109,11 +109,11 @@ export class AppComponent {
109109

110110
```
111111

112-
Additionally, you have the option to customize the icons of toolbar items using the [iconCss](../api/rich-text-editor/emojiIconsSet/#iconCss) and [code](../api/rich-text-editor/emojiIconsSet/#code) properties. The `iconCSS` property allows you to define a custom CSS class for the toolbar item icon, while the `code` property enables you to specify the Unicode character code for the icon.
112+
Additionally, you have the option to customize the icons of toolbar items using the [iconCss](https://helpej2.syncfusion.com/angular/documentation/api/rich-text-editor/emojiIconsSet/#iconcss) and [code](https://helpej2.syncfusion.com/angular/documentation/api/rich-text-editor/emojiIconsSet/#code) properties. The `iconCSS` property allows you to define a custom CSS class for the toolbar item icon, while the `code` property enables you to specify the Unicode character code for the icon.
113113

114114
When both `iconCSS` and `code` properties are provided, the `iconCSS` property takes precedence in determining the appearance of the toolbar item icon.
115115

116-
Additionally, you have the option to enhance the user experience by implementing a filtering feature for efficiently managing a large dataset of emojis. By setting the [showSearchBox](../api/rich-text-editor/emojiSettings/#showSearchBox) property to `true` (which is the default value), users will be able to utilize a search box to filter the displayed emojis according to their preferences.
116+
Additionally, you have the option to enhance the user experience by implementing a filtering feature for efficiently managing a large dataset of emojis. By setting the [showSearchBox](https://helpej2.syncfusion.com/angular/documentation/api/rich-text-editor/emojiSettingsModel/#showsearchbox) property to `true` (which is the default value), users will be able to utilize a search box to filter the displayed emojis according to their preferences.
117117

118118
The following code example shows how to add the emoji picker tool in the Rich Text Editor.
119119

@@ -135,7 +135,7 @@ The following code example shows how to add the emoji picker tool in the Rich Te
135135

136136
Quickly access the emoji picker by pressing the colon (:) key while typing a word prefix in an editor, allowing instant emoji selection and display. Moreover, continue typing in the editor after the colon (:) to filter and refine your search for the desired emojis.
137137

138-
![Angular Rich Text Editor Emoji Picker](./images/angular-richtexteditor-emoji-picker-web.png)
138+
![Angular Rich Text Editor Emoji Picker](../images/angular-richtexteditor-emoji-picker-web.png)
139139

140140
## Navigating and selecting emojis using the keyboard
141141

ej2-angular/rich-text-editor/tools/text-formatting.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ The table below lists the available text styles in the Rich Text Editor's toolba
2020

2121
| Name | Icons | Summary | Initialization |
2222
|----------------|---------|---------|------------------------------------------|
23-
| Bold | ![Bold icon](./images/bold.png) | Makes text thicker and darker | toolbarSettings: { items: ['Bold']} | `<b>bold</b>` |
24-
| Italic | ![Italic icon](./images/italic.png) | Slants text to the right | toolbarSettings: { items: ['Italic']} | `<em>italic</em>` |
25-
| Underline | ![Underline icon](./images/under-line.png) | Adds a line beneath the text | toolbarSettings: { items: ['Underline']} |
26-
| StrikeThrough | ![StrikeThrough icon](./images/strikethrough.png) | Applies a line through the text. |toolbarSettings: { items: ['StrikeThrough']}|
27-
| InlineCode |![InlineCode icon](./images/inlineCode.png) | Formats text as inline code | toolbarSettings: { items: ['InlineCode']} | `<code>inline code</code>`|
28-
| SubScript | ![SubScript icon](./images/sub-script.png) | Positions text slightly below the normal line |toolbarSettings: { items: ['SubScript']}|
29-
| SuperScript | ![SuperScript icon](./images/super-script.png) | Positions text slightly above the normal line |toolbarSettings: { items: ['SuperScript’']}|
30-
| LowerCase | ![LowerCase icon](./images/lower-case.png) | Converts text to lowercase |toolbarSettings: { items: ['LowerCase']}|
31-
| UpperCase | ![UpperCase icon](./images/upper-case.png) | Converts text to uppercase |toolbarSettings: { items: ['UpperCase’']}|
23+
| Bold | ![Bold icon](.../images/bold.png) | Makes text thicker and darker | toolbarSettings: { items: ['Bold']} | `<b>bold</b>` |
24+
| Italic | ![Italic icon](../images/italic.png) | Slants text to the right | toolbarSettings: { items: ['Italic']} | `<em>italic</em>` |
25+
| Underline | ![Underline icon](../images/under-line.png) | Adds a line beneath the text | toolbarSettings: { items: ['Underline']} |
26+
| StrikeThrough | ![StrikeThrough icon](../images/strikethrough.png) | Applies a line through the text. |toolbarSettings: { items: ['StrikeThrough']}|
27+
| InlineCode |![InlineCode icon](../images/inlineCode.png) | Formats text as inline code | toolbarSettings: { items: ['InlineCode']} | `<code>inline code</code>`|
28+
| SubScript | ![SubScript icon](../images/sub-script.png) | Positions text slightly below the normal line |toolbarSettings: { items: ['SubScript']}|
29+
| SuperScript | ![SuperScript icon](../images/super-script.png) | Positions text slightly above the normal line |toolbarSettings: { items: ['SuperScript’']}|
30+
| LowerCase | ![LowerCase icon](../images/lower-case.png) | Converts text to lowercase |toolbarSettings: { items: ['LowerCase']}|
31+
| UpperCase | ![UpperCase icon](../images/upper-case.png) | Converts text to uppercase |toolbarSettings: { items: ['UpperCase’']}|
3232

3333
Please refer to the sample below to add these basic text styling options in the Rich Text Editor.
3434

0 commit comments

Comments
 (0)