# Key Features

C1Editor for WinForms provides feature like editing modes, load and save XHTML, cascading style sheet, spell checker, clipboard support, custom tags and text formatting.

## Content



The following are some of the main features of [C1Editor](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.html) that you may find useful:

*   **"On the fly" synchronizing with XmlDocument**
    
    Bind the C1Editor control to a document specified in the [Document](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Document.html) property. If the document is edited within the C1Editor, the underlying XmlDocument syncs to match it. If the XmlDocument changes in code, these changes are visible in the C1Editor control at run time. See [Binding C1Editor to a Document](/componentone/docs/win/online-richtexteditor/editorforwinformstas/bindingc1editortoado) for more information.
    
*   **C1Editor provides three edit modes: Design, Source, and Preview**
    
    The C1Editor control features three editor modes: **Design**, **Source**, and **Preview**. You can determine which of these views users will see initially by setting the [Mode](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Mode.html) property. See the [C1Editor Overview](/componentone/docs/win/online-richtexteditor/editorforwinformsele/c1editoroverview) for more information.
    
*   **Load and save Xhtml documents from or to a file or stream**
    
    You can load an XHTML document into C1Editor from a file, stream or XML string. You can save an XHTML document to a file or stream. See the [Editor for WinForms Task-Based Help](/componentone/docs/win/online-richtexteditor/editorforwinformstas) for examples on how to do this.
    
*   **Editor for WinForms offers Cascading Style Sheet support, including easy-to-define custom CSS styles for Design and Preview mode**
    
    C1Editor fully supports cascading style sheets (CSS) in edited documents. In addition, you can specify external CSS rules in CSS files which will be used only in **Design** or **Preview** mode. The [LoadDesignCSS](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.LoadDesignCSS.html) and [LoadPreviewCSS](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.LoadPreviewCSS.html) methods support this feature by loading a cascading style sheet from a file or stream.
    
    See [Using a Cascading Style Sheet with C1Editor](/componentone/docs/win/online-richtexteditor/editorforwinformstas/usingacascadingstyle) for an example on using the LoadDesignCSS method.
    
*   **Code clean-up routines**
    
    On document loading, switching off **Source** mode, or on executing the [ValidateSource](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.ValidateSource.html) or [FixSource](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.FixSource.html) methods, C1Editor automatically removes empty tags, closes unclosed tags, and generally improves messy or unreadable HTML or XHTML code, converting it to valid XHTML.
    
*   **Editor for WinForms' built-in spell checker allows you to check as you type**
    
    Spell-checking functionality is provided by ComponentOne's **C1SpellChecker** component.
    
    C1Editor fully supports **C1SpellChecker** so you can use all of its great features, including: modal **Dialog mode** (users can choose to correct or ignore errors through a dialog box), **As-you-type** **mode** (spelling errors are indicated by a red, wavy underline), and the **AutoReplace** feature (misspelled words are automatically corrected as you type). In **As-you-type** **mode**, the built-in C1Editor context menu merges with the **C1SpellChecker** context menu so you can see and select all available commands.
    
*   **Ability to add custom tags in DTD**
    
    Advanced programming tasks sometimes require using additional DTD elements in the edited document. You can enter the elements, or tags, in the document specifying them using the [XmlExtensions](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.XmlExtensions.html) property in special XML format. See the **CustomTags** sample installed with this product for a complete example of this feature.
    
*   **Access and manage data from code selections and the caret position**
    
    You can access content in the C1Editor by specifying a range of characters to select. For an example, see [Selecting Characters in the C1Editor](/componentone/docs/win/online-richtexteditor/editorforwinformstas/selectingcharactersi).
    
*   **Text decoration and block formatting commands**
    
    You can easily set font and text decoration and block formatting properties in a text block without worrying about how to modify the underlying XmlDocument. Use the [C1TextRange](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1TextRange.html) class to identify target text and the C1TextRange methods to apply the decoration or formatting: [ApplyTag](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1TextRange.ApplyTag.html), [ApplyClass](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1TextRange.ApplyClass.html), [ApplyStyle](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1TextRange.ApplyStyle.html), and **ApplyFormatting**.
    
*   **Use built-in or custom dialog boxes to insert links, pictures, tables, and other objects**
    
    You can show built-in or custom dialog boxes to insert or edit various objects at the current selection. The dialog boxes allow you to specify all properties of the inserted or edited object. For example, the **Picture** dialog box contains fields to select the image source, or file name, alternate text, size, and so on. C1Editor also has a built-in **Find and Replace** dialog box that allows the user to specify a string to search for and a replacement string, as well as the options to use when searching for text in a document. If you prefer, you can create and use your own find and replace dialog box, specifying it in the [CustomDialogs](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.CustomDialogs.html) property of the C1Editor.
    
    For more information on **C1Editor**'s built-in dialog boxes, or for steps on how to use your own, see [C1Editor Dialog Boxes](/componentone/docs/win/online-richtexteditor/c1editorruntimeeleme/c1editordialogboxes).
    
*   **Use the mouse to move or resize pictures or tables**
    
    You can interact with objects directly in**Design**mode by specifying their size or position with the mouse.
    
    Moving is a direct manipulation. You can move an object within a document in any direction. C1Editorwill move relative to the XmlNode and/or set the new position attributes of the object automatically.
    
    Resizing allows you to resize the selected object in the direction of the mouse pointer movement. **C1Editor** will set the new size attributes of the object automatically.
    
*   **Printing support**
    
    Calling the [Print](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Print.html) method has the same effect as choosing **Print** from the Windows Internet Explorer **File** menu. The Print method can activate the **Print** dialog box, prompting the user to change print settings.
    
    The [PrintPreview](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.PrintPreview.html) method lets you see the Web page before you print it so you can avoid printing mistakes.
    
    See the **PrintTemplate** sample installed with this product for a complete example of this feature.
    
*   **Clipboard support**
    
    You can select text, tables or graphics and use the [Cut](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Cut.html) or [Copy](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Copy.html) methods of C1Editor to move your selection to the Clipboard. Then you can paste the selection into another program. You can copy HTML from a program or even a picture in Internet Explorer and then use the [Paste](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Paste.html) method to put it into the C1Editor.
    
    The [PasteAsText](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.PasteAsText.html) method automatically formats the text you paste into the C1Editor as plain text.
    
    C1Editor also supports keyboard shortcuts such as CTRL+C (copy), CTRL+X (cut), and CTRL+V (paste).
    
    To determine what clipboard operations are allowed, use the [CanCut](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.CanCut.html), [CanCopy](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.CanCopy.html), [CanPaste](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.CanPaste.html), and [CanPasteAsText](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.CanPasteAsText.html) properties.
    
*   **History of changes (undo/redo)**
    
    C1Editor has an unlimited undo history mechanism. You can programmatically access the editing history, calling the [Undo](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Undo.html) or [Redo](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.Redo.html) methods. The **Undo** and **Redo** methods also support keyboard shortcuts: CTRL+Z (undo) and CTRL+Y (redo).
    
    By undoing repeatedly, a user can gradually work back to the point before the error was made.