Skip to content

Commit ab3dceb

Browse files
Merge pull request #3801 from syncfusion-content/8170440-color-des-cm
817044: Added the Font Color changing by UI in Core and MVC
2 parents f223a5b + 0416fc8 commit ab3dceb

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed
Loading

ej2-asp-core-mvc/document-editor/text-format.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: Text Format in ##Platform_Name## Document Editor Component
3+
title: Text Format in ##Platform_Name## Document Editor Component | Syncfusion
44
description: Learn here all about text format in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
66
control: Text Format
@@ -116,6 +116,19 @@ documenteditor.selection.characterFormat.fontSize= 32;
116116

117117
## Color
118118

119+
### Change Font Color by UI Option
120+
121+
In the Document Editor, the Text Properties pane features two icons for managing text color within the user interface (UI):
122+
123+
* **Colored Box:** This icon visually represents the **current color** applied to the selected text.
124+
* **Text (A) Icon:** Clicking this icon allows users **to modify the color** of the selected text by choosing a new color from the available options.
125+
126+
This Font Color option appear as follows.
127+
128+
![Font Color](images/fontColor.PNG)
129+
130+
### Change Font Color by Code
131+
119132
The color of selected text can be get or set using the following code.
120133

121134
```typescript
@@ -149,7 +162,9 @@ documenteditor.selection.characterFormat.highlightColor= '#FFC0CB';
149162
{% include code-snippet/document-editor/text-format/tagHelper %}
150163
{% endhighlight %}
151164
{% highlight c# tabtitle="Text-format.cs" %}
152-
{% endhighlight %}{% endtabs %}
165+
{% include code-snippet/document-editor/text-format/document-editor.cs %}
166+
{% endhighlight %}
167+
{% endtabs %}
153168

154169
{% elsif page.publishingplatform == "aspnet-mvc" %}
155170

@@ -158,7 +173,9 @@ documenteditor.selection.characterFormat.highlightColor= '#FFC0CB';
158173
{% include code-snippet/document-editor/text-format/razor %}
159174
{% endhighlight %}
160175
{% highlight c# tabtitle="Text-format.cs" %}
161-
{% endhighlight %}{% endtabs %}
176+
{% include code-snippet/document-editor/text-format/document-editor.cs %}
177+
{% endhighlight %}
178+
{% endtabs %}
162179
{% endif %}
163180

164181

0 commit comments

Comments
 (0)