Skip to content

Commit

Permalink
🎨 Supports disabling Markdown syntax input for some inline elements #…
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Apr 26, 2024
1 parent b9f269a commit a432fa2
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions app/src/config/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,6 @@ export const editor = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="fullWidth" type="checkbox"${window.siyuan.config.editor.fullWidth ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSup}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSupTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSup" type="checkbox"${window.siyuan.config.editor.markdown.inlineSup ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSub}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSubTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSub" type="checkbox"${window.siyuan.config.editor.markdown.inlineSub ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineTag}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineTagTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineTag" type="checkbox"${window.siyuan.config.editor.markdown.inlineTag ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineMath}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineMathTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineMath" type="checkbox"${window.siyuan.config.editor.markdown.inlineMath ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.justify}
Expand Down Expand Up @@ -298,7 +266,39 @@ export const editor = {
<div class="fn__hr"></div>
<textarea class="b3-text-field fn__block" id="katexMacros" spellcheck="false">${window.siyuan.config.editor.katexMacros}</textarea>
</div>
</div>`;
</div>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSup}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSupTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSup" type="checkbox"${window.siyuan.config.editor.markdown.inlineSup ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSub}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSubTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSub" type="checkbox"${window.siyuan.config.editor.markdown.inlineSub ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineTag}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineTagTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineTag" type="checkbox"${window.siyuan.config.editor.markdown.inlineTag ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineMath}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineMathTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineMath" type="checkbox"${window.siyuan.config.editor.markdown.inlineMath ? " checked" : ""}/>
</label>`;
},
bindEvent: () => {
const fontFamilyElement = editor.element.querySelector("#fontFamily") as HTMLSelectElement;
Expand Down

0 comments on commit a432fa2

Please sign in to comment.