From 21ccbeae4af3109be5a5a4cbcdf21e5b8bbb23de Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Tue, 26 May 2026 18:45:45 -0500 Subject: [PATCH] Add CloudCannon annotation snippet (#868) Adds a custom 'Annotation' snippet to the CloudCannon Add snippet menu, alongside the existing button snippets, so editors can insert mkdocs-material annotations (visible text + revealed note) from the GUI. --- cloudcannon.config.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/cloudcannon.config.yml b/cloudcannon.config.yml index 85d39b1730..06472385b8 100755 --- a/cloudcannon.config.yml +++ b/cloudcannon.config.yml @@ -208,3 +208,36 @@ _snippets: label: Button Icon comment: > Search available icons here. Remove the colons on each side when pasting. +#brandon added this for annotations + mkdoc_annotation: + snippet: "[[annotated_text]] (1)\n{ .annotate }\n\n1. [[annotation_content]]" + preview: + text: + - key: annotated_text + - 'Annotation' + subtext: + - key: annotation_content + picker_preview: + text: Annotation + params: + annotated_text: + parser: content + options: + editor_key: annotated_text + style: + trim_text: true + annotation_content: + parser: content + options: + editor_key: annotation_content + style: + trim_text: true + _inputs: + annotated_text: + type: text + label: Visible text + comment: The text the reader sees, with a hover/tap marker after it. + annotation_content: + type: text + label: Annotation content + comment: The hidden note revealed when the marker is clicked.