ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Set default font in client-side

This example demonstrates how to set the defaultFontFamily and defaultFontSize properties of the Obout.Ajax.UI.HTMLEditor.EditPanel component.


Font family:    Font size:
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor" TagPrefix="obout" %>
<obout:Editor runat="server" Id="editor" Width="100%" >
<TopToolbar Appearance="Lite" PreservePlace="true" />
<EditPanel Height="200px" />
</obout:Editor><br />
Font family:
<select onchange="setFontFamily(this.options.item(this.selectedIndex).value)">
<option value=""><default></option>
<option value="arial">Arial</option>
<option value="tahoma">Tahoma</option>
<option value="courier new">Courier new</option>
<option value="georgia">Georgia</option>
Font size:
<select onchange="setFontSize(this.options.item(this.selectedIndex).value)">
<option value=""><default></option>
<option value="6pt">6pt</option>
<option value="8pt">8pt</option>
<option value="12pt">12pt</option>
<option value="14pt">14pt</option>
<script type="text/javascript">
function setFontSize(value) {
  var editPanel = $find("<%= editor.ClientID %>").get_editPanel();
function setFontFamily(value) {
  var editPanel = $find("<%= editor.ClientID %>").get_editPanel();

"Having used both Telerik and Component Art controls I can definitely say that the Obout Suite offers the most flexible and easy to implement controls about. And for the few problems I have had the support team have been most helpful, often providing showcase examples to help me understand things."

Tim Finch

Random testimonial   All testimonials