edit-text-operation for Linkmanager in a Storyeditor

89 views
Skip to first unread message

Jan

unread,
Nov 5, 2018, 4:37:23 PM11/5/18
to Tiddlywiki
Dear Writers

Is there something like
<$action-sendmessage $message="tm-edit-text-operation" $param="write-selection-to" title/>

I want to use Tiddlywiki to write nonlinear stories with a group of students. To import and mix stories it is necessary to add the usernames to the Tiddlers created.
This is why I would like to automatically set a Link of this structure [[selection|{{$:/status/UserName}}/selection]]


I tried this...but it always has a delay of one click...

 
\define Userlink() 
[[{{$:/Temp/newlink}}|{{$:/status/UserName}}/{{$:/Temp/newlink}}]]
\end

<$action-sendmessage
	$message="tm-edit-text-operation"
	$param="excise"
	title="$:/Temp/newlink"
	type="link"
/>
<$wikify name="Newlink" text=<<Userlink>>>
<$action-sendmessage $message="tm-edit-text-operation" $param="replace-selection"  text=<<Newlink>> />
</$wikify>

Is there a solution for this Problem?

Greetings Jan

TonyM

unread,
Nov 6, 2018, 4:51:24 PM11/6/18
to TiddlyWiki
Jan,

If the $:/status/UserName is set, it will populate hidden fields in each tiddler called creator and/or modifier see https://tiddlywiki.com/#TiddlerFields

  • You could then use normal filter operators to select the different users tiddlers via these fields
  • You could set these field manually in tiddlers <$edit-text tiddler=tiddlername field="modifier"/> (From another tiddler - not the current) or by other using a template.
With the above information, I wonder if your question is still relevant?

Regards
Tony

Jan

unread,
Nov 6, 2018, 6:24:19 PM11/6/18
to tiddl...@googlegroups.com
Hi Tony
the problem I want to solve by creating tiddlernames including the modifier is that this would prevent overwriting tiddlers.
When my students write stories there is a strong probability that some have a tiddlers with matching names [[In the morning]] or [[later]]
Importing both would ruin one of the stories.

Yours Jan
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/29761507-ea8a-41e1-b112-012c68a90974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TonyM

unread,
Nov 6, 2018, 7:39:02 PM11/6/18
to TiddlyWiki
Jan,

I have worked on the principals behind doing this, as a result of discussions arising from the New Comments plugin in 5.1.18 and my desire to publish noteself Wikis online from which people can export and send any tiddlers they modify or create for subsequent inclusion in another Wiki.

A Quick work around, is to install Marios bundle https://wikilabs.github.io/editions/bundler/#%24%3A%2FControlPanel that has a setting to allow you to stop overwrites during import.

Personally I think the best approach is to build an new import feature. The $:/import tiddler is created from $:/core/ui/ImportListing Each time an import takes place. 

I have added a list to add additional columns to the import table
<$list filter="[tag[$:/tags/importcolumn]]" variable=import-column-tiddler> <td> <$transclude tiddler=<<import-column-tiddler>> field="text"/> </td> </$list>

This is not at all complete, but I would like to add the ability to add a prefix during import.

I would suggest in your case the tiddlers are prefixed something like $:/importfrom/modifier/"original tiddler name"

Then it would be a simple matter of adding to the view template, the ability to list below any given tiddler, a list of tiddlers who's suffix is the same as the current tiddler name 
eg; "original tiddler name" From there you can decide how you will treat each one.

Of course we could make this even more sophisticated to facilitate your needs, ie accepting collaborative input, but I believe this lies with the import facility.

I hope to add a feature to the import, not to import tiddlers that have a wiki-owner field set to the current wiki, to stop over-writing the tiddlers "source of truth".

Regards
Tony 

TonyM

unread,
Nov 6, 2018, 7:57:40 PM11/6/18
to tiddl...@googlegroups.com
Post Script

To stop duplicate tiddlers in the first place, if the wikis that users were adding to had a new Edit Button, that only showed when it was a tiddler for which they were the creator that may help. Then refuse to import any tiddler that will overwrite any existing one (using the bundler plugin), tell the users you will not accept edits to existing tiddlers.

Regards
Tony

Jan

unread,
Nov 7, 2018, 6:42:17 PM11/7/18
to tiddl...@googlegroups.com
Hi Tony,
this seems to be a very smart solution.
I have to wait for the weekend to check out..

Thanks a lot Jan


Am 07.11.2018 um 01:57 schrieb TonyM:
Post Script

To stop duplicate tiddlers in the first place, if the wikis that users were adding to had a new Edit Button, that only showed when it was a tiddler for which they were the creator that may help. Then refuse to import any tiddler that will overwrite and existing one (using the bundler plugin), tell the users you will not accept edits to existing tiddlers.
Reply all
Reply to author
Forward
0 new messages