From 1f4f164d5e6f7cc26826bd11a8834a464338d696 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 6 Feb 2025 12:55:45 +0000 Subject: [PATCH] Take advantage of compiled palettes More robust because previously we couldn't cope with indirect palette entries in these situations --- core/modules/editor/engines/framed.js | 2 +- core/ui/PaletteManager.tid | 2 +- core/wiki/macros/tag-picker.tid | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 34d11dec7..41e3c5a75 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -34,7 +34,7 @@ function FramedEngine(options) { this.parentNode.insertBefore(this.iframeNode,this.nextSibling); this.iframeDoc = this.iframeNode.contentWindow.document; // (Firefox requires us to put some empty content in the iframe) - var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette"); + var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette/palette-colours"); var colorScheme = (this.widget.wiki.getTiddler(paletteTitle) || {fields: {}}).fields["color-scheme"] || "light"; this.iframeDoc.open(); this.iframeDoc.write(""); diff --git a/core/ui/PaletteManager.tid b/core/ui/PaletteManager.tid index 524ab02d0..81403d1f6 100644 --- a/core/ui/PaletteManager.tid +++ b/core/ui/PaletteManager.tid @@ -17,7 +17,7 @@ title: $:/PaletteManager {{$:/snippets/palettetests}} <$let - paletteSettings={{{ [{$:/palette}get[settings]] :else[{$:/palette}get[palette-import]!match[]get[settings]] }}} + paletteSettings={{{ [[$:/temp/palette-consolidated]get[settings]] }}} > <%if [!match[]] %>
diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index 2ceaab7c4..881f88b41 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -166,7 +166,7 @@ The second ESC tries to close the "draft tiddler" <$let - palette={{$:/palette}} + palette="$:/temp/palette-colours" colourA={{{ [getindex[foreground]] }}} colourB={{{ [getindex[background]] }}} fallbackTarget={{{ [getindex[tag-background]] }}}