Folks,
You may be aware of the WidgetMessage: tm-edit-text-operation which is used in the creation of Editor Toolbar buttons. The powerful set of text operations include;
- excise
- replace-all
- replace-selection
- prefix-lines
- wrap-lines
- wrap-selection
- save-selection
- make-link
- insert-text
- focus-editor
I have being working on making a few wizzards Building Wizards eg create new view toolbar button - #3 by TW_Tones and realise how useful these could be if;
Rather than the action operating only on the selection, could it operate on one or all results of a search operation on a given tiddler/fieldname?
- In wizzards we can be privileged to have strings made unique so we can safely target all occurances and replace only that which we need to.
I observe it is mentioned in $:/core/modules/editor/factory.js where it says;
Factory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases
- Is this indicating there may already be a way to do this, ie in non-toolbar mode?
- It also contains handling for different fields, could it be used on field contents?
In addition to using it triggered by a step wise widget I wounder if it could be used to operate on an underlying field, such as the text field, but also from a button delivered on the viewTemplate?
- Basicaly it would be an extension of other widgets that let us operate within a field (mostly text) unlike most widgets that update the tiddler store tags/fields/list/references