Skip to content

Commit 22b6c94

Browse files
updated article with suggestions from review
1 parent 6f5501a commit 22b6c94

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

controls/editor/how-to/save-content-with-default-font.md renamed to controls/editor/how-to/save-content-with-predefined-font.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Save Content with Default Font
3-
page_title: Save Content with Default Font | RadEditor for ASP.NET AJAX Documentation
4-
description: Save RadEditor Content with Default Font
5-
slug: editor/how-to/save-content-with-default-font
6-
tags: save, content, with, default, font
2+
title: Save Content with Predefined Font
3+
page_title: Save Content with Predefined Font | RadEditor for ASP.NET AJAX Documentation
4+
description: Save RadEditor Content with Predefined Font
5+
slug: editor/how-to/save-content-with-predefined-font
6+
tags: save, content, with, predefined, font
77
published: True
88
position: 12
99
---
1010

11-
# Save Content with Default Font
11+
# Save Content with Predefined Font
1212

13-
In this article you will see how to save the RadEditor's content with a default font.
13+
In this article you will see how to save the RadEditor's content with a predefined font.
1414

1515
Generally, the editor's content is saved in a database without the external style sheets. This means only the inline styles will be preserved when the content is saved in a database.
1616

@@ -47,7 +47,7 @@ You can use the editor's [get_html()]({%slug editor/client-side-programming/meth
4747
<script>
4848
function submitContent(sender, args) {
4949
var editor = $find("RadEditor2");
50-
editor.set_html("<div style='font-family:Arial;font-size:20px;'>" + editor.get_html() + "</div>");
50+
editor.set_html("<div style='font-family:Arial;font-size:20px;'>" + editor.get_html(true) + "</div>");
5151
}
5252
</script>
5353
<telerik:RadButton ID="RadButton1" runat="server" Text="Submit Editor Content" AutoPostBack="true" OnClientClicked="submitContent" />
@@ -84,7 +84,7 @@ You can fire a particular font command (e.g., `FontName` or `RealFontSize`). Thi
8484

8585
## Define external stylesheets and use CSS inliner tool that will convert them to inline styles
8686

87-
You can use any external CSS Inliner Tool to convert the external stylesheets of the editor to inline styles. For example you can find below an integration sample with the [PreMailer.Net](https://github.com/milkshakesoftware/PreMailer.Net) CSS Inliner Tool.
87+
You can use any external CSS Inliner Tool to convert the external stylesheets of the editor to inline styles (**Example 4**).
8888

8989
1. Define the .css files via the CssFiles collection.
9090
1. Read the .css files and place that content inside the style tag of the editor content.
@@ -127,7 +127,7 @@ protected void Button1_Click(object sender, EventArgs e)
127127

128128
string rawContent = "<html><head><style>" + css.ToString() + "</style></head><body>" + content + "</body></html>";
129129

130-
var contentInlineStyles = PreMailer.Net.PreMailer.MoveCssInline(rawContent, true);
130+
var contentInlineStyles = MyCSSInlinerTool.MoveCssInline(rawContent, true); //Where MyCSSInlinerTool is an external tool that that converts stylesheets to inline styles.
131131
}
132132
````
133133
````VB
@@ -143,7 +143,7 @@ Protected Sub Button1_Click(sender As Object, e As EventArgs)
143143

144144
Dim rawContent As String = "<html><head><style>" & css.ToString() & "</style></head><body>" & content & "</body></html>"
145145

146-
Dim contentInlineStyles = PreMailer.Net.PreMailer.MoveCssInline(rawContent, True)
146+
Dim contentInlineStyles = MyCSSInlinerTool.MoveCssInline(rawContent, True) 'Where MyCSSInlinerTool is an external tool that that converts stylesheets to inline styles.
147147
End Sub
148148
````
149149

0 commit comments

Comments
 (0)