text insert
Inserts text at INDEX, with optional tags.
PATHNAME insert INDEX TEXT ?TAGS? ?TEXT TAGS ...?
Description
Puts TEXT before the character at INDEX. TAGS is a list of tags for the new text. With more pairs, each TEXT gets its own TAGS. With no TAGS, the new text gets the tags that the characters at both sides of it have. A text with -state disabled keeps its content.
Returns
An empty string.
Examples
% text .in
> .in insert end "hello world"
> .in insert 1.5 ","
> .in get 1.0 1.end
hello, world
% text .in2
> .in2 insert end Bold bold " and " {} Italic italic
> .in2 tag names 1.0
bold
Errors
% text .in3; .in3 insert
wrong # args: should be ".in3 insert index chars ?tagList chars tagList ...?"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1