Hey Jeremy, 

 Thanks for that information.  That actually pointed me in the right 
direction, to learning that you've already implemented 
$:/tags/EditTemplate, which does what I was trying to do.  

Matt LAuber

On Thursday, February 7, 2019 at 6:42:43 AM UTC-5, Jeremy Ruston wrote:
>
> Hi Matt
>
> The current implementation in the core does not exactly have two separate 
> edit templates for text and images. Instead the ability to edit multiple 
> content types is implemented by the <$edit> widget deferring to 
> type-specific variants for images, text, etc. Thus, if one wanted to add a 
> new type of editor for a new content type called "jack" using the MIME type 
> "foo/bar", one would add a new <$edit-jack> widget, and then create a 
> tiddler $:/config/EditorTypeMappings/foo/bar with the content "jack" that 
> points the content type "foo/bar" to the <$edit-jack> widget.
>
> Best wishes
>
> Jeremy.
>
> On Wednesday, February 6, 2019 at 2:31:23 PM UTC, Matthew Lauber wrote:
>>
>> All, 
>>    Right now, we've got two types of Edit Templates, one for text and one 
>> for images.  In one of my recent plugins (
>> https://github.com/mklauber/tw-CreatureManager) I ended up overwriting a 
>> bit of the core in order to implement a third type (for editing tiddlers 
>> with type "Creature").  In doing so, I realized it would be possible to 
>> implement an extensible EditTemplate system, where users could create edit 
>> templates for new types of tiddlers.  If you look at 
>> https://github.com/mklauber/tw-CreatureManager/blob/master/%24__core_ui_EditTemplate.tid#L17
>>  
>> I check for a tiddler titled $:/core/uiEditTemplate/$type$, before 
>> defaulting to $:/core/ui/EditTemplate/default where I put the original 
>> contents of $:/core/ui/EditTemplate.  Is this a good use of the type field, 
>> and what do people think of this as functionality?  Is it something you'd 
>> like to see in the core?
>>
>> Matt Lauber
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/54bd01e9-229f-4ffd-91bf-cc6c8b4f71c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to