1
1
---
2
2
layout : post
3
- title : Text Format in # #Platform_Name## Document Editor Component
3
+ title : Text Format in # #Platform_Name## Document Editor Component | Syncfusion
4
4
description : Learn here all about text format in Syncfusion # #Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more.
5
5
platform : ej2-asp-core-mvc
6
6
control : Text Format
@@ -116,6 +116,19 @@ documenteditor.selection.characterFormat.fontSize= 32;
116
116
117
117
## Color
118
118
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
+
119
132
The color of selected text can be get or set using the following code.
120
133
121
134
``` typescript
@@ -149,7 +162,9 @@ documenteditor.selection.characterFormat.highlightColor= '#FFC0CB';
149
162
{% include code-snippet/document-editor/text-format/tagHelper %}
150
163
{% endhighlight %}
151
164
{% highlight c# tabtitle="Text-format.cs" %}
152
- {% endhighlight %}{% endtabs %}
165
+ {% include code-snippet/document-editor/text-format/document-editor.cs %}
166
+ {% endhighlight %}
167
+ {% endtabs %}
153
168
154
169
{% elsif page.publishingplatform == "aspnet-mvc" %}
155
170
@@ -158,7 +173,9 @@ documenteditor.selection.characterFormat.highlightColor= '#FFC0CB';
158
173
{% include code-snippet/document-editor/text-format/razor %}
159
174
{% endhighlight %}
160
175
{% highlight c# tabtitle="Text-format.cs" %}
161
- {% endhighlight %}{% endtabs %}
176
+ {% include code-snippet/document-editor/text-format/document-editor.cs %}
177
+ {% endhighlight %}
178
+ {% endtabs %}
162
179
{% endif %}
163
180
164
181
0 commit comments