From 54cfda76ee353190f1cf0210b9071894fb1a5690 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Thu, 9 Dec 2021 20:47:51 +0000 Subject: [PATCH] ViewTemplateBodyCascade: Add support for code-body field Missed off #6168 --- core/wiki/config/ViewTemplateBodyFilters.multids | 1 + core/wiki/tags/ViewTemplateBodyFilter.tid | 2 +- plugins/tiddlywiki/internals/editpreviews/raw.tid | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/wiki/config/ViewTemplateBodyFilters.multids b/core/wiki/config/ViewTemplateBodyFilters.multids index 3bc1fba5b..b2344aae3 100644 --- a/core/wiki/config/ViewTemplateBodyFilters.multids +++ b/core/wiki/config/ViewTemplateBodyFilters.multids @@ -2,6 +2,7 @@ title: $:/config/ViewTemplateBodyFilters/ tags: $:/tags/ViewTemplateBodyFilter system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/]!field:title[$:/core/readme]!field:title[$:/core/icon]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[limit[1]then[$:/core/ui/ViewTemplate/body/code]] +code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]] import: [field:plugin-type[import]then[$:/core/ui/ViewTemplate/body/import]] plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/plugin]] hide-body: [field:hide-body[yes]then[$:/core/ui/ViewTemplate/body/blank]] diff --git a/core/wiki/tags/ViewTemplateBodyFilter.tid b/core/wiki/tags/ViewTemplateBodyFilter.tid index 5fa531119..50c36da68 100644 --- a/core/wiki/tags/ViewTemplateBodyFilter.tid +++ b/core/wiki/tags/ViewTemplateBodyFilter.tid @@ -1,3 +1,3 @@ title: $:/tags/ViewTemplateBodyFilter -list: $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default +list: $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default diff --git a/plugins/tiddlywiki/internals/editpreviews/raw.tid b/plugins/tiddlywiki/internals/editpreviews/raw.tid index 13d5e99ec..6cffe1457 100644 --- a/plugins/tiddlywiki/internals/editpreviews/raw.tid +++ b/plugins/tiddlywiki/internals/editpreviews/raw.tid @@ -2,5 +2,6 @@ title: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/raw tags: $:/tags/EditPreview caption: raw HTML list-after: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/widget-tree +code-body: yes
<$view field="text" format="htmlwikified" />