[]
Represents a Winforms html editor based on WebView2.
[ToolboxBitmap(typeof(C1Editor), "C1Editor.png")]
public class C1Editor : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, ISupportInitialize
| Name | Description |
|---|---|
| C1Editor() | This constructor creates C1Editor and initializes the C1Editor control. |
| Name | Description |
|---|---|
| DesignEdit | Gets or sets whether the editor is in Design or Preview mode asynchronously. True if the editor content can be edited. |
| RightToLeft | Gets or sets whether the editor operates with RightToLeft or LeftToRight. |
| Text | |
| UserDataFolder | Gets or sets the value to pass as the userDataFolder parameter of Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions) when creating an environment with this instance. |
| Name | Description |
|---|---|
| BeginInit() | |
| BoldSelection() | Adds the Bold attribute to the currently selected text. |
| BoldSelectionAsync() | Adds the Bold attribute to the currently selected text asynchronously. |
| ClearStylesAtSelection() | Removes all text styling definitions within the selected regions and outer definitions will be applied. |
| ClearStylesAtSelectionAsync() | Removes all text styling definitions within the selected regions and outer definitions will be applied asynchronously. |
| CopySelectedFragmentToClipboard() | Copies the selected document fragment to the clipboard. The fragment can be pasted as text only with PasteText() or as a fragment with PasteFragment. Fragments include current formatting. |
| CopySelectedFragmentToClipboardAsync() | Copies the selected document fragment to the clipboard. The fragment can be pasted as text only with PasteText() or as a fragment with PasteFragment. Fragments include current formatting asynchronously. |
| CopySelectionToClipboard() | Copies the selected text to the clipboard. Alternatively, text can be copied to the clipboard by right-click, copy. |
| CopySelectionToClipboardAsync() | Copies the selected text to the clipboard. Alternatively, text can be copied to the clipboard by right-click, copy asynchronously. |
| CutSelectedFragmentToClipboard() | Copies the selected document fragment to the clipboard and removes the selected data from the document. |
| CutSelectedFragmentToClipboardAsync() | Copies the selected document fragment to the clipboard and removes the selected data from the document asynchronously. |
| Dispose(bool) | Clean up any resources being used. |
| EndInit() | |
| FindAndDecorate(string, string, string, string) | Finds and decorates all occurrences of a text string in the document. |
| FindAndDecorate(Regex, string, string, string) | Finds and decorates all the matches in the document. |
| FindAndDecorateAsync(string, string, string, string) | Finds and decorates all occurrences of a text string in the document asynchronously. |
| FindAndDecorateAsync(Regex, string, string, string) | Finds and decorates all the matches in the document asynchronously. |
| FindAndSelect(string, int) | Finds and selects the occurrence of a text string in the document. |
| FindAndSelectAsync(string, int) | Finds and selects the occurrence of a text string in the document asynchronously. |
| FindTextReplace(string, string) | Find and replaces all occurrences of the specified text. |
| FindTextReplaceAsync(string, string) | Find and replaces all occurrences of the specified text asynchronously. |
| GetInnerHTML(string) | Gets InnerHTML of the specified or body element. |
| GetInnerHTMLAsync(string) | Gets InnerHTML of the specified or body element asynchronously. |
| GetSelectedText() | Gets currently selected text. |
| GetSelectedTextAsync() | Gets currently selected text asynchronously. |
| GetSelectionFontInfo() | Retrieves the current font information of the text at the cursor. |
| GetSelectionFontInfoAsync() | Retrieves the current font information of the text at the cursor asynchronously. |
| GetText() | Gets text content of the document. |
| GetTextAsync() | Gets text content of the document asynchronously. |
| HeaderSelection(int) | Adds Header attribute to the currently selection text. |
| HeaderSelectionAsync(int) | Adds Header attribute to the currently selection text asynchronously. |
| HighlightSelectionText(Color) | Adds the specified backcolor attribute to the currently selected text. |
| HighlightSelectionTextAsync(Color) | Adds the specified backcolor attribute to the currently selected text asynchronously. |
| InsertHyperlink(string, string, string) | Inserts a hyperlink at the cursor location. If text is selected it is overwritten. |
| InsertHyperlinkAsync(string, string, string) | Inserts a hyperlink at the cursor location. If text is selected it is overwritten asynchronously. |
| InsertImageAtSelection(Image, string) | Inserts an image at the current cursor position. |
| InsertImageAtSelectionAsync(Image, string) | Inserts an image at the current cursor position asynchronously. |
| InsertList(string, string[], string) | Inserts a list at the cursor location. If text is selected, it is overwritten. |
| InsertListAsync(string, string[], string) | Inserts a list at the cursor location. If text is selected, it is overwritten asynchronously. |
| InsertTableAtSelection(string, int, int, bool, bool, string) | Inserts a table described by the parameters at the current cursor position. |
| InsertTableAtSelectionAsync(string, int, int, bool, bool, string) | Inserts a table described by the parameters at the current cursor position asynchronously. |
| InsertTableColumnAtSelection(bool) | Inserts a column into the table at the current cursor position. |
| InsertTableColumnAtSelectionAsync(bool) | Inserts a column into the table at the current cursor position asynchronously. |
| InsertTableRowAtSelection(bool) | Inserts a row into the table at the current cursor position. |
| InsertTableRowAtSelectionAsync(bool) | Inserts a row into the table at the current cursor position asynchronously. |
| ItalicSelection() | Adds the Italics attribute to the currently selected text. |
| ItalicSelectionAsync() | Adds the Italics attribute to the currently selected text asynchronously. |
| LoadDocumentAsync(Stream, bool) | Loads content from the stream asynchronously. |
| LoadDocumentAsync(string, StringType) | Loads content from the string asynchronously. |
| LoadDocumentRequest(string, bool) | Runs the file dialog and loads the selected document. |
| LoadDocumentRequestAsync(string, bool) | Runs the file dialog and loads the selected document asynchronously. |
| OnC1EditorIsReady(EventArgs) | A virtual method called when the editor is ready for operations. |
| OnCurrentTextStyleChanged(TextStyleEventArgs) | A virtual method called when the cursor position is changed by key or mouse action. |
| OnDesignEditChanged(EventArgs) | A virtual method called when the DesignEdit property is changes. |
| OnDocumentLoaded(EventArgs) | A virtual method called when asynchronous document loading is complete. |
| OnHandleCreated(EventArgs) | |
| OnRightToLeftChanged(EventArgs) | Raises the RightToLeftChanged event. |
| OnSelectedTextChanged(TextEventArgs) | A virtual method called when the Editor's selected text changes. |
| PasteFragment(string) | Pastes a document fragment at the selection location. |
| PasteFragmentAsync(string) | Pastes a document fragment at the selection location asynchronously. |
| PasteText(string) | Paste text or document fragment at the selection location. |
| PasteTextAsync(string) | Paste text or document fragment at the selection location asynchronously. |
| RemoveBoldSelection() | Removes the Bold attribute from the currently selected text. |
| RemoveBoldSelectionAsync() | Removes the Bold attribute from the currently selected text asynchronously. |
| RemoveElement(string, string, string, bool) | Removes element by its ID, tag and/or class name. |
| RemoveElementAsync(string, string, string, bool) | Removes element by its ID, tag and/or class name asynchronously. |
| RemoveFontAtSelection() | Removes any overriding font for the selected text. |
| RemoveFontAtSelectionAsync() | Removes any overriding font for the selected text asynchronously. |
| RemoveHeaderSelection(int) | Removes Header specific header attribute from the currently selection text. |
| RemoveHeaderSelectionAsync(int) | Removes Header specific header attribute from the currently selection text asynchronously. |
| RemoveHighlightSelectionText() | Removes the specified backcolor attribute from the currently selected text. |
| RemoveHighlightSelectionTextAsync() | Removes the specified backcolor attribute from the currently selected text asynchronously. |
| RemoveItalicSelection() | Removes the Italics attribute from the currently selected text. |
| RemoveItalicSelectionAsync() | Removes the Italics attribute from the currently selected text asynchronously. |
| RemoveParagraphFontAtSelection() | Removes any overriding font for the paragraph at the current cursor position. |
| RemoveParagraphFontAtSelectionAsync() | Removes any overriding font for the paragraph at the current cursor position asynchronously. |
| RemoveParagraphStyleAtSelection() | Removes any overriding style for the paragraph at the current cursor position. |
| RemoveParagraphStyleAtSelectionAsync() | Removes any overriding style for the paragraph at the current cursor position asynchronously. |
| RemoveSelectionForeColor() | Removes the all forecolor attributes from the currently selected text. |
| RemoveSelectionForeColorAsync() | Removes the all forecolor attributes from the currently selected text asynchronously. |
| RemoveStrikeThroughSelection() | Removes the StrikeThrough attribute from the currently selected text. |
| RemoveStrikeThroughSelectionAsync() | Removes the StrikeThrough attribute from the currently selected text asynchronously. |
| RemoveSubscriptSelection() | Removes the SubScript attribute from the currently selected text. |
| RemoveSubscriptSelectionAsync() | Removes the SubScript attribute from the currently selected text asynchronously. |
| RemoveSuperscriptSelection() | Removes the SuperScript attribute from the currently selected text. |
| RemoveSuperscriptSelectionAsync() | Removes the SuperScript attribute from the currently selected text asynchronously. |
| RemoveTableAtSelection() | Removes a table specified at the current cursor position. |
| RemoveTableAtSelectionAsync() | Removes a table specified at the current cursor position asynchronously. |
| RemoveTableColumnAtSelection() | Removes a table column at the current cursor position. |
| RemoveTableColumnAtSelectionAsync() | Removes a table column at the current cursor position asynchronously. |
| RemoveTableRowAtSelection() | Removes a table row at the current cursor position. |
| RemoveTableRowAtSelectionAsync() | Removes a table row at the current cursor position asynchronously. |
| RemoveTextAlignmentSelection() | Removes the horizontal alignment from the paragraph of the currently selected text. |
| RemoveTextAlignmentSelectionAsync() | Removes the horizontal alignment from the paragraph of the currently selected text asynchronously. |
| RemoveUnderlineSelection() | Removes the Underline attribute from the currently selected text. |
| RemoveUnderlineSelectionAsync() | Removes the Underline attribute from the currently selected text asynchronously. |
| ReplaceElement(string, string, string, string) | Replaces the found elements with the specified HTML fragment. |
| ReplaceElementAsync(string, string, string, string) | Replaces the found elements with the specified HTML fragment asynchronously. |
| ReplaceSelectedText(string) | Replaces selected text with the text in the clipboard. Alternatively, text and images can paste over selected text by right-click, paste. |
| ReplaceSelectedTextAsync(string) | Replaces selected text with the text in the clipboard. Alternatively, text and images can paste over selected text by right-click, paste asynchronously. |
| RunColorSelectionTextDialog() | Runs the standard color dialog and sets the selected text forecolor; |
| RunColorSelectionTextDialogAsync() | Runs the standard color dialog and sets the selected text forecolor asynchronously; |
| RunFontDialogForParagraph() | Runs the font dialog and sets the font for the paragraph at the current cursor position. |
| RunFontDialogForParagraphAsync() | Runs the font dialog and sets the font for the paragraph at the current cursor position asynchronously. |
| RunFontDialogForSelection() | Runs the font dialog and sets the font of the selected text. |
| RunFontDialogForSelectionAsync() | Runs the font dialog and sets the font of the selected text asynchronously. |
| RunHighlightSelectionTextDialog() | Runs the standard color dialog and sets the selected text backcolor. |
| RunHighlightSelectionTextDialogAsync() | Runs the standard color dialog and sets the selected text backcolor asynchronously. |
| SaveDocumentAsync(Stream, bool) | Saves the current editor content to the stream asynchronously. |
| SaveDocumentAsync(string) | Saves the current editor content to the specified filepath asynchronously. |
| SaveDocumentRequest(string, bool) | Runs the file dialog and saves the editor content to the selected file. |
| SaveDocumentRequestAsync(string, bool) | Runs the file dialog and saves the editor content to the selected file asynchronously. |
| SaveDocumentToPDFAsync(string) | Print the current page to PDF asynchronously. |
| SelectionForeColor(Color) | Adds the specified forecolor attribute to the currently selected text. |
| SelectionForeColorAsync(Color) | Adds the specified forecolor attribute to the currently selected text asynchronously. |
| SetCssStyleAtSelection(string, string, string) | Sets CSS style to the selected tag. |
| SetCssStyleAtSelectionAsync(string, string, string) | Sets CSS style to the selected tag asynchronously. |
| SetCssStyles(string) | Set CSS styles for the document. |
| SetCssStylesAsync(string) | Set CSS styles for the document. |
| SetDefaultStyles(string, bool) | Sets the default css style for the document. |
| SetDefaultStylesAsync(string, bool) | Sets the default css style for the document asynchronously. |
| SetFontAtSelection(Font) | Set the font for the selected text. |
| SetFontAtSelectionAsync(Font) | Set the font for the selected text. |
| SetParagraphFontAtSelection(Font) | Sets the font for the paragraph at the current cursor position. |
| SetParagraphFontAtSelectionAsync(Font) | Sets the font for the paragraph at the current cursor position asynchronously. |
| ShowDevTools() | Raises the Edge based DevTools window for the document. |
| ShowDevToolsAsync() | Raises the Edge based DevTools window for the document asynchronously. |
| StrikeThroughSelection() | Adds the StrikeThrough attribute to the currently selected text. |
| StrikeThroughSelectionAsync() | Adds the StrikeThrough attribute to the currently selected text asynchronously. |
| SubscriptSelection() | Adds the SubScript attribute to the currently selected text. |
| SubscriptSelectionAsync() | Adds the SubScript attribute to the currently selected text asynchronously. |
| SuperscriptSelection() | Adds the SuperScript attribute to the currently selected text. |
| SuperscriptSelectionAsync() | Adds the SuperScript attribute to the currently selected text asynchronously. |
| TextAlignmentSelection(HorizontalAlignment) | Specifies the horizonal alignment of the paragraph of the currently selected text. |
| TextAlignmentSelection(TextAlignment) | Specifies the horizonal alignment of the paragraph of the currently selected text. |
| TextAlignmentSelectionAsync(HorizontalAlignment) | Specifies the horizonal alignment of the paragraph of the currently selected text asynchronously. |
| TextAlignmentSelectionAsync(TextAlignment) | Specifies the horizonal alignment of the paragraph of the currently selected text asynchronously. |
| UnderlineSelection() | Adds the Underline attribute to the currently selected text. |
| UnderlineSelectionAsync() | Adds the Underline attribute to the currently selected text asynchronously. |
| Name | Description |
|---|---|
| C1DocumentLoaded | An event fired when a document has been loaded. |
| C1EditorReady | An event fired when the editor is ready for operations. This event is appropriate for loading existing documents. |
| CurrentTextStyleChanged | An event called each time the cursor position is changed by key or mouse action and reports the style of the text at the new cursor position. |
| DesignEditChanged | An event fired when DesignEdit changes. |
| SelectedTextChanged | An event fired when Editor selected text changed. |