1
1
---
2
2
layout : post
3
- title : Styles in # #Platform_Name## Document Editor Component
3
+ title : Styles in # #Platform_Name## Document Editor Component | Syncfusion
4
4
description : Learn here all about styles in Syncfusion # #Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more.
5
5
platform : ej2-asp-core-mvc
6
6
control : Styles
@@ -80,7 +80,8 @@ New Styles are defined and added to the style collection of the document. In thi
80
80
{% include code-snippet/document-editor/character-style/tagHelper %}
81
81
{% endhighlight %}
82
82
{% highlight c# tabtitle="Character-style.cs" %}
83
- {% endhighlight %}{% endtabs %}
83
+ {% endhighlight %}
84
+ {% endtabs %}
84
85
85
86
{% elsif page.publishingplatform == "aspnet-mvc" %}
86
87
@@ -89,7 +90,8 @@ New Styles are defined and added to the style collection of the document. In thi
89
90
{% include code-snippet/document-editor/character-style/razor %}
90
91
{% endhighlight %}
91
92
{% highlight c# tabtitle="Character-style.cs" %}
92
- {% endhighlight %}{% endtabs %}
93
+ {% endhighlight %}
94
+ {% endtabs %}
93
95
{% endif %}
94
96
95
97
@@ -103,7 +105,8 @@ New Styles are defined and added to the style collection of the document. In thi
103
105
{% include code-snippet/document-editor/paragraph-style/tagHelper %}
104
106
{% endhighlight %}
105
107
{% highlight c# tabtitle="Paragraph-style.cs" %}
106
- {% endhighlight %}{% endtabs %}
108
+ {% endhighlight %}
109
+ {% endtabs %}
107
110
108
111
{% elsif page.publishingplatform == "aspnet-mvc" %}
109
112
@@ -112,7 +115,8 @@ New Styles are defined and added to the style collection of the document. In thi
112
115
{% include code-snippet/document-editor/paragraph-style/razor %}
113
116
{% endhighlight %}
114
117
{% highlight c# tabtitle="Paragraph-style.cs" %}
115
- {% endhighlight %}{% endtabs %}
118
+ {% endhighlight %}
119
+ {% endtabs %}
116
120
{% endif %}
117
121
118
122
@@ -126,7 +130,8 @@ New Styles are defined and added to the style collection of the document. In thi
126
130
{% include code-snippet/document-editor/linked-style/tagHelper %}
127
131
{% endhighlight %}
128
132
{% highlight c# tabtitle="Linked-style.cs" %}
129
- {% endhighlight %}{% endtabs %}
133
+ {% endhighlight %}
134
+ {% endtabs %}
130
135
131
136
{% elsif page.publishingplatform == "aspnet-mvc" %}
132
137
@@ -135,7 +140,8 @@ New Styles are defined and added to the style collection of the document. In thi
135
140
{% include code-snippet/document-editor/linked-style/razor %}
136
141
{% endhighlight %}
137
142
{% highlight c# tabtitle="Linked-style.cs" %}
138
- {% endhighlight %}{% endtabs %}
143
+ {% endhighlight %}
144
+ {% endtabs %}
139
145
{% endif %}
140
146
141
147
@@ -155,3 +161,14 @@ documenteditor.editor.applyStyle('New Linked');
155
161
// Clear direct formatting and apply the specified style
156
162
documenteditor .editor .applyStyle (' New Linked' , true );
157
163
```
164
+
165
+ ## Get Styles
166
+
167
+ You can get the styles in the document using the below code snippet.
168
+
169
+ ``` typescript
170
+ // Get paragraph styles
171
+ var paragraphStyles = documentEditor .getStyles (' Paragraph' );
172
+ // Get character styles
173
+ var characterStyles = documentEditor .getStyles (' Character' );
174
+ ```
0 commit comments