> For the complete documentation index, see [llms.txt](https://docs.wisej.com/extensions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/extensions/extensions/tinyeditor/api/wisej.web.ext.tinyeditor.tinyeditor.md).

# TinyEditor

Namespace: **Wisej.Web.Ext.TinyEditor**

Assembly: **Wisej.Web.Ext.TinyEditor** (3.2.0.0)

* [Control](https://docs.wisej.com/api?q=wisej.web.control)
  * [Widget](https://docs.wisej.com/api?q=wisej.web.widget)
    * [TinyEditor](/extensions/extensions/tinyeditor/api/wisej.web.ext.tinyeditor.tinyeditor.md)

TinyEditor is a simple JavaScript WYSIWYG editor that is both lightweight (8KB) and standalone from: [TinyEditor](https://github.com/jessegreathouse/TinyEditor). It can easily be customized to integrate with any website through CSS and the multitude of parameters. It handles most of the basic formatting needs and has some functionality built in to help keep the rendered markup as clean as possible.

{% tabs %}
{% tab title="C#" %}

```csharp
public class TinyEditor : Widget
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TinyEditor
    Inherits Widget
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/-MirBsnmjWIxMsN8l0Ms)TinyEditor()

## Properties

### ![](/files/-MirBsnox1cbEBcVJYTK)DefaultFontNames

[String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns the default buttons to show in the toolbar.

### ![](/files/-MirBsnox1cbEBcVJYTK)DefaultToolbar

[String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns the default buttons to show in the toolbar.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)FontNames

[String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the font names to display in the toolbar.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)InitScript

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Overridden to create our initialization script.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)Packages

[List\<Package>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list): Overridden to return our list of script resources.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)ShowFooter

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Shows or hides the footer panel. (Default: `True`)

### ![](/files/-MirBsnmjWIxMsN8l0Ms)ShowToolbar

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Shows or hides the toolbar panel. (Default: `True`)

### ![](/files/-MirBsnmjWIxMsN8l0Ms)SourceText

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the text to use in the SOURCE button in the footer panel. (Default: `"source"`)

### ![](/files/-MirBsnmjWIxMsN8l0Ms)StyleSheetSource

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the custom css file used by the editor. (Default: `""`)

### ![](/files/-MirBsnmjWIxMsN8l0Ms)Text

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the HTML text associated with this control. (Default: `""`)

### ![](/files/-MirBsnmjWIxMsN8l0Ms)Toolbar

[String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the buttons to show in the toolbar.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)WysiwygText

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the text to use in the WYSIWYG button in the footer panel. (Default: `"wysiwyg"`)

## Methods

### ![](/files/-MirBsnmjWIxMsN8l0Ms)ExecCommand(command, showDefaultUI, argument)

Executes commands to manipulate the contents of the editable region.

| Parameter         | Type                                                                  | Description                                                                                                                                                                                               |
| ----------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **command**       | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)   | The name of the command to execute. See [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) for a list of commands.                                                      |
| **showDefaultUI** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) | Indicates whether the default user interface should be shown. This is not implemented in Mozilla.                                                                                                         |
| **argument**      | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)   | For commands which require an input argument (such as insertImage, for which this is the URL of the image to insert), this is a string providing that information. Specify null if no argument is needed. |

Most commands affect the document's selection (bold, italics, etc.), while others insert new elements (adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand() will affect the currently active editable element.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)ExecCommand(command, argument)

Executes commands to manipulate the contents of the editable region.

| Parameter    | Type                                                                | Description                                                                                                                                                                                               |
| ------------ | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **command**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The name of the command to execute. See [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) for a list of commands.                                                      |
| **argument** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | For commands which require an input argument (such as insertImage, for which this is the URL of the image to insert), this is a string providing that information. Specify null if no argument is needed. |

Most commands affect the document's selection (bold, italics, etc.), while others insert new elements (adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand() will affect the currently active editable element.

### ![](/files/-MirBsnmjWIxMsN8l0Ms)Update()

Causes the control to update the corresponding client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/extensions/extensions/tinyeditor/api/wisej.web.ext.tinyeditor.tinyeditor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
