I ask the above (title) because it would be useful to populate a field with a pragma that I can import into tiddlers.
- This I expect would allow either simple fields or text area fields to contain pragma
Why;
- user selection or designer tools could thus populate a field on the current tiddler with pragma including functions and procedures in the current tiddler, to apply only to nominated tiddlers allowing the development of a self contained development tools.
- Examples include developing filters, functions, procedure’s and widgets in a single tiddler, and eventualy generate appropriate support tiddlers.
I did raise this before but now the use is more even compelling.
How;
It should be as simple as allowing the inclusion of text references not just tiddler names in the import pragma, and include optional tiddler and field parameters (in addition to the filter parameter) on the import variables widget.
Eg \import {{!!fieldname}}
or \import {{tiddlername!!fieldname}}
What;
This would allow me to create tools for the creation of buttons, macros and more, bundled in a single tiddler, that could be installed on demand, and deleted after generating the desired element. The single tiddler approach is clean an removable without additional tools.
[Post Scrtipt] I already have a set of tools this will complement including a tiddler to have its own view or edit template, this will allow a single tiddler to define in its own fields macros, functions, procedures that it uses for its own purpose.
- This could include special parsing rules, or redefined widgets and more that apply only to the tiddler itself.
- This could allow advanced users to implement a kind of sand box or write macros especially for transforming a bespoke tiddler and its content, without time consuming references to multiple tiddlers.
- The result can be designed to programmatically generate tiddlers for a package or plugin.
- Keeping such tiddler free of code in the text field allows slabs of content to be pasted into the text field without concern for deleting code within the text field.
I would be happy if this was in a plugin that overwrites the core for now, not core changes (yet).