Wt: Wt::Ext::TextEdit Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Ext::TextEdit Class Reference
Ext widgets (Wt::Ext, deprecated)

A rich-text editor. More...

`#include <Ext/TextEdit>`

Inheritance diagram for Wt::Ext::TextEdit:
[legend]

List of all members.

## Public Member Functions
| TextEdit (WContainerWidget *parent=0)
| Create a rich text editor with empty text.
| TextEdit (const WString &text, WContainerWidget *parent=0)
| Create a rich text editor initialized with the given HTML text.
void | setText (const WString &value)
| Set the text.
const WString & | text () const
| Return the text.
void | setLinkDefault (const WString &text, const WString &location)
| Set the default location and link text used when inserting a link.
void | setEnableAlignments (bool enable)
| Enable or disable alignment buttons.
void | setEnableColors (bool enable)
| Enable or disable changing of text color.
void | setEnableFont (bool enable)
| Enable or disable changing of text font.
void | setEnableFormat (bool enable)
| Enable or disable changing of text formatting.
void | setEnableLinks (bool enable)
| Enable or disable insertion of links.
void | setEnableLists (bool enable)
| Enable or disable insertion of lists.
void | setEnableSourceEdit (bool enable)
| Enable or disable a view which shows the raw HTML source.
virtual void | resize (const WLength &width, const WLength &height)
| Resizes the widget.
virtual WValidator::State | validate ()
| Validate the field.

## Detailed Description

A rich-text editor.

A rich-text editor that provides interactive editing of HTML, including basic mark-up (font, formatting, color, links, and lists).

TextEdit

Note:
  This widget does not work in XHTML documents. Use WTextEdit instead.

## Member Function Documentation

void Wt::Ext::TextEdit::resize | ( | const WLength & | width,
|  | const WLength & | height
| ) |  | `[virtual]`

Resizes the widget.

Specifies a fixed size for this widget, setting CSS `width` and `height` properties. By default a widget has automatic width and height, which sets a size for the widget following CSS rules.

When the widget is not managed by a layout manager, the automatic (natural) size of a widget depends on whether they widget is a block or inline widget:

- a block widget takes by default the width of the parent, and the height that it needs based on its contents
- an inline widget takes the width and height that it needs based on its contents (possibly wrapping over multiple lines). The width and height of an inline widget cannot be changed (by the letter of CSS, although most browsers will react to it in varying ways).

When inserted in a layout manager, the size set will be used as a widget's preferred size, but the widget may be given a different size by the layout manager based on available space and stretch factors. The actual size given by a layout manager may be retrieved by making the widget "layout size aware", using setLayoutSizeAware(). If you have defined a `"wtResize()"` JavaScript method for the widget, then this method will also be called.

The default width and height of a widget is WLength::Auto.

See also:
  width(), height()

Reimplemented from Wt::WWebWidget.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator