diff --git a/src/gui/choiceList/ChoiceListItem.svelte b/src/gui/choiceList/ChoiceListItem.svelte
index 50cedec..7fe8795 100644
--- a/src/gui/choiceList/ChoiceListItem.svelte
+++ b/src/gui/choiceList/ChoiceListItem.svelte
@@ -1,58 +1,62 @@
- {choice.name}
-
-
+
+
+
-
+
diff --git a/src/gui/choiceList/MultiChoiceListItem.svelte b/src/gui/choiceList/MultiChoiceListItem.svelte
index aa6c9fb..c0bafec 100644
--- a/src/gui/choiceList/MultiChoiceListItem.svelte
+++ b/src/gui/choiceList/MultiChoiceListItem.svelte
@@ -5,6 +5,7 @@
import IMultiChoice from "../../types/choices/IMultiChoice";
import RightButtons from "./ChoiceItemRightButtons.svelte";
import {createEventDispatcher} from "svelte";
+ import { Component, htmlToMarkdown, MarkdownRenderer } from "obsidian";
export let choice: IMultiChoice;
export let collapseId: string;
@@ -28,6 +29,21 @@
function duplicateChoice() {
dispatcher('duplicateChoice', {choice});
}
+
+ let nameElement: HTMLSpanElement;
+
+ $: {
+ if (nameElement) {
+ nameElement.innerHTML = "";
+ const nameHTML = htmlToMarkdown(choice.name);
+ MarkdownRenderer.renderMarkdown(
+ nameHTML,
+ nameElement,
+ "/",
+ null as unknown as Component
+ );
+ }
+ }
@@ -35,7 +51,7 @@
choice.collapsed = !choice.collapsed}>
- {choice.name}
+
{
if (choiceExecutor) this.choiceExecutor = choiceExecutor;
}
+ renderSuggestion(item: FuzzyMatch, el: HTMLElement): void {
+ el.empty();
+ MarkdownRenderer.renderMarkdown(item.item.name, el, '', this.plugin);
+ el.classList.add("quickadd-choice-suggestion");
+ }
+
getItemText(item: IChoice): string {
return item.name;
}
diff --git a/src/styles.css b/src/styles.css
index b5d78be..c26e821 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -214,3 +214,27 @@
.qaFileSuggestionItem .suggestion-sub-text {
font-style: italic;
}
+
+/* ChoiceListItem.svelte */
+.choiceListItem {
+ display: flex;
+ font-size: 16px;
+ align-items: center;
+ margin: 12px 0 0 0;
+ transition: 1000ms ease-in-out;
+}
+
+
+.choiceListItemName {
+ flex: 1 0 0;
+}
+
+.choiceListItemName p {
+ margin: 0;
+ display: inline;
+}
+
+/* ChoiceSuggester.ts */
+.quickadd-choice-suggestion p {
+ margin: 0;
+}
\ No newline at end of file