Skip to content

Commit

Permalink
Updates to make Excision more friendly to Markdown users by adding
Browse files Browse the repository at this point in the history
Markdown as an option in the criteria to use excision and by making the
excise operation reuse the type of the tiddler being excised.
  • Loading branch information
michaeljmcd committed Aug 8, 2024
1 parent 4da27f6 commit 511435f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/modules/editor/operations/text/excise.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ exports["excise"] = function(event,operation) {
{
title: excisionTitle,
text: operation.selection,
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : []
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [],
type: editTiddler.fields.type
}
));
operation.replacement = excisionTitle;
Expand Down
2 changes: 1 addition & 1 deletion core/ui/EditorToolbar/excise.tid
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
icon: $:/core/images/excise
caption: {{$:/language/Buttons/Excise/Caption}}
description: {{$:/language/Buttons/Excise/Hint}}
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/vnd.tiddlywiki]] +[first[]]
condition: [<targetTiddler>type[]] [<targetTiddler>type[text/vnd.tiddlywiki]] [<targetTiddler>type[text/markdown]] [<targetTiddler>type[text/x-markdown]] +[first[]]
shortcuts: ((excise))
dropdown: $:/core/ui/EditorToolbar/excise-dropdown

0 comments on commit 511435f

Please sign in to comment.