Docs for the new tm-edit-text-operation save-selection action

single-tiddler-mode
Jermolene 2018-06-30 08:35:10 +01:00
rodzic 2f425c303f
commit 19b54fe905
1 zmienionych plików z 14 dodań i 1 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
caption: tm-edit-text-operation
created: 20160424211339792
modified: 20160424230944519
modified: 20180630073432471
tags: Messages
title: WidgetMessage: tm-edit-text-operation
type: text/vnd.tiddlywiki
@ -81,6 +81,18 @@ Surrounds the current //selection// with the provided <<.param "prefix">> and <<
</div>
\end
\define saveSelectionDescription()
<div>
Saves the text of the current //selection// into the provided <<.param "tiddler">> and <<.param "field">>.
|!Name |!Description |
|tiddler |Tiddler title to which the selection will be saved |
|field |Field name (defaults to "text") |
</div>
\end
A `tm-edit-text-operation` invokes one of the available operations on a __surrounding__ text editor. Therefore the message has to be dispatched within the editor in order for it to catch it. The following properties on the `event` object are required:
@ -101,6 +113,7 @@ At this point the following text operations have been implemented:
|<<.def "prefix-lines">>|<<prefixLinesDescription>> |
|<<.def "wrap-lines">>|<<wrapLinesDescription>> |
|<<.def "wrap-selection">>|<<wrapSelectionDescription>> |
|<<.def "save-selection">>|<<saveSelectionDescription>> |
!Example