# VTextEdit

**Hereda de:** [Widget](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/widget.md).

Esta clase representa al control de edición de texto multilínea. Edita texto normal y enriquecido.

## [Propiedades](https://doc.velneo.com/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/pages/-M7D7Y3Mco1zW1j7VPJc#documentación-de-propiedades)

| Tipo          | Propiedad                                                                                             |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| const Boolean | [acceptRichText](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#acceptrichtext) |
| const Boolean | [modified](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#modified)             |
| const Boolean | [readOnly](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#readonly)             |

## Funciones

**Generales**

| Retorno | Función                                                                                                |
| ------- | ------------------------------------------------------------------------------------------------------ |
| void    | [append](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#append)( String text )   |
| void    | [clear](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#clear)()                  |
| void    | [selectAll](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#selectall)()          |
| void    | [setText](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#settext)( String text ) |
| String  | [text](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#text)()                    |

**De portapapeles**

| Retorno | Función                                                                                     |
| ------- | ------------------------------------------------------------------------------------------- |
| Boolean | [canPaste](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#canpaste)() |
| void    | [copy](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#copy)()         |
| void    | [cut](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#cut)()           |
| void    | [paste](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#paste)()       |
| void    | [redo](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#redo)()         |
| void    | [undo](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#undo)()         |

**De toolbars & menu de contexto**

| Retorno | Función                                                                                                                                 |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| void    | [hideAlignToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#hidealigntoolbar)()                             |
| void    | [hideAllToolBars](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#hidealltoolbars)()                               |
| void    | [hideFormatToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#hideformattoolbar)()                           |
| void    | [hideListToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#hidelisttoolbar)()                               |
| void    | [hideStyleToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#hidestyletoolbar)()                             |
| void    | [setContextMenuEnabled](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#setcontextmenuenabled)( Boolean bEnabled ) |
| void    | [showAlignToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#showaligntoolbar)()                             |
| void    | [showAllToolBars](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#showalltoolbars)()                               |
| void    | [showFormatToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#showformattoolbar)()                           |
| void    | [showListToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#showlisttoolbar)()                               |
| void    | [showStyleToolBar](/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md#showstyletoolbar)()                             |

## Señales

| Señal         |
| ------------- |
| Value changed |

## Documentación de propiedades

#### acceptRichText

Devuelve true si el control admite texto enriquecido.

#### modified

Devuelve true si el contenido del control ha sido modificado.

#### readOnly

Devuelve true si el control es de sólo lectura.

## Documentación de funciones

### Funciones generales

#### void append( String text ) <a href="#append" id="append"></a>

Añade un nuevo párrafo con el texto especificado al final del texto editado. El nuevo texto tendrá el mismo formato de carácter y bloque que tenga el párrafo en curso.

Parámetros:

* text: texto a añadir al control.

#### void clear() <a href="#clear" id="clear"></a>

Limpia el contenido del control.

#### void selectAll() <a href="#selectall" id="selectall"></a>

Selecciona todo el contenido del control.

#### void setText( String text ) <a href="#settext" id="settext"></a>

Asigna el texto especificado al control. Cualquier texto que contenga el control será sustituido por el nuevo texto especificado en el parámetro.

Parámetros:

* text: texto a asignar al control.

#### String text() <a href="#text" id="text"></a>

Devuelve el texto del control.

### Funciones de portapapeles

#### Boolean canPaste() <a href="#canpaste" id="canpaste"></a>

Devuelve true si el control permite pegar texto desde el portapapeles o false si pegar está desactivado.

#### void copy() <a href="#copy" id="copy"></a>

Copia el contenido seleccionado del control al portapapeles.

#### void cut() <a href="#cut" id="cut"></a>

Corta el contenido seleccionado del control y lo pasa al portapapeles.

#### void paste() <a href="#paste" id="paste"></a>

Pega el contenido del portapapeles en el control.

#### void redo() <a href="#redo" id="redo"></a>

Deshace el último cambio.

#### void undo() <a href="#undo" id="undo"></a>

Rehace el último cambio.

### Funciones de toolbars & menu de contexto

#### void hideAlignToolBar() <a href="#hidealigntoolbar" id="hidealigntoolbar"></a>

Oculta la toolbar de alineamiento.

#### void hideAllToolBars() <a href="#hidealltoolbars" id="hidealltoolbars"></a>

Oculta todas las toolbars.

#### void hideFormatToolBar() <a href="#hideformattoolbar" id="hideformattoolbar"></a>

Oculta la toolbar de formato.

#### void hideListToolBar() <a href="#hidelisttoolbar" id="hidelisttoolbar"></a>

Oculta la toolbar de listas.

#### void hideStyleToolBar() <a href="#hidestyletoolbar" id="hidestyletoolbar"></a>

Oculta la toolbar de estilos.

#### void setContextMenuEnabled( Boolean bEnabled ) <a href="#setcontextmenuenabled" id="setcontextmenuenabled"></a>

Permite activar o desactivar el menú de contexto.

Parámetros:

* bEnabled: valor booleano. True=El menú contextual está activado. False=El menú contextual está desactivado.

#### void showAlignToolBar() <a href="#showaligntoolbar" id="showaligntoolbar"></a>

Muestra la toolbar de alineamiento.

#### void showAllToolBars() <a href="#showalltoolbars" id="showalltoolbars"></a>

Muestra todas las toolbars.

#### void showFormatToolBar() <a href="#showformattoolbar" id="showformattoolbar"></a>

Muestra la toolbar de formato

#### void showListToolBar() <a href="#showlisttoolbar" id="showlisttoolbar"></a>

Muestra la toolbar de listas.

#### void showStyleToolBar() <a href="#showstyletoolbar" id="showstyletoolbar"></a>

Muestra la barra de estilos.

## Ejemplos

### Ejemplo de copiar el contenido de un control al portapapeles

```javascript
var control = theRoot.dataView().control("CONTROL_TEXTO");
control.selectAll() // Seleccionamos todo el contenido del control
control.copy() // Copiamos la selección al portapapeles
```


---

# Agent Instructions: 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:

```
GET https://doc.velneo.com/23/velneo-vdevelop/scripts/lenguajes/javascript/clases/vtextedit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
