Hi Matt, Tony,
Here is my take: *wikifying means reusing the result of the wikification in
your code instead of displaying it*.
Indeed, wikification typically produces a complex HTML string, so if you
rather need a flat text string, the safest route is to ask <$wikify> to
render a sequence of <$text> widgets as in:
\define foo()
\whitespace trim
<$text text={{{ [[$:/temp/selected
class]get[text]else[tc-view-field-name]addsuffix[ ]addprefix[@@.]] }}} />
<$text text=<<currentTiddler>> />
<$text text="@@ "/>
\end
Here is the string computed in `<<foo>>`: //<<foo>>//
<$edit-text tag=input tiddler tiddler="$:/temp/selected class"
placeholder="give a CSS class" default='blue' />
<$wikify name=class-caption text=<<foo>>>
<$button>
<!-- let's use foo to instead set a field, thanks to <$wikify> -->
<$action-setfield caption=<<class-caption>> />
set class ''<$text text={{{ [[$:/temp/selected
class]get[text]else[tc-view-field-name]] }}}/>'' to the current caption
</$button>
</$wikify>
Admittedly, this is a rather dumb example: it merely shows that you can
compute new wikitext (for later reuse) by retrieving the string that is
build in the <<foo>> macro, instead of displaying it.
Cheers,
-- Xavier Cazin
On Sat, Feb 1, 2020 at 7:57 PM Mat <[email protected]> wrote:
> Thanks for input guys. My question was solely about a word definition for
> what "to wikify" means. Only now did I realize I can google it
> <https://en.wiktionary.org/wiki/wikify> (ingenious!) and I find:
>
> To adapt to the standards and facilities of an existing wiki
>> <https://en.wiktionary.org/wiki/wiki>, such as by marking up
>> <https://en.wiktionary.org/wiki/mark_up> with wikitext
>> <https://en.wiktionary.org/wiki/wikitext>
>
>
> Now, this makes me think even more that when *we* use wikify, we have our
> own local definition of the term because while I instinctively agree with
> the proposed definition above, this does not seem to be how we use it in
> tiddlyverse. So again, exactly what do we mean when we say "wikify"? Maybe
> it only means "to apply the WikifyWidget"?
>
> And, further: What term should I use when I mean the above definition?
> Perhaps "convert to wikitext"?
>
> <:-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/7449439c-7492-4ae3-98a9-dddb434e5b05%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/7449439c-7492-4ae3-98a9-dddb434e5b05%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/CADeSwYPvzxGgr7ZZYD9AbSCP_s5Z%2Bi6PqY7UvHR78LitCQ_jaQ%40mail.gmail.com.