mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 00:31:19 +08:00
🎨 Support disabling ==foo==
inline mark syntax https://github.com/siyuan-note/siyuan/issues/13868
This commit is contained in:
parent
4521665274
commit
ae9531577a
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "عدم التشغيل تلقائيًا",
|
||||
"autoLaunchMode1": "التشغيل التلقائي بعد الإقلاع",
|
||||
"autoLaunchMode2": "التشغيل التلقائي وتقليل الواجهة الرئيسية بعد الإقلاع",
|
||||
"editorMarkdownInlineMark": "صيغة العلامة المضمنة في Markdown",
|
||||
"editorMarkdownInlineMarkTip": "بمجرد التمكين، سيتم دعم إدخال صيغة العلامة المضمنة <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "صياغة الشطب بخط داخل السطر في Markdown",
|
||||
"editorMarkdownInlineStrikethroughTip": "بعد التمكين, سيتم دعم إدخال <code class='fn__code'>~~foo~~</code> لإضافة شطب بخط داخل السطر",
|
||||
"editorMarkdownInlineSup": "صياغة النص المرتفع دخل السطر في Markdown",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Nicht automatisch starten",
|
||||
"autoLaunchMode1": "Automatisch nach dem Booten starten",
|
||||
"autoLaunchMode2": "Automatisch starten und die Hauptoberfläche minimieren nach dem Booten",
|
||||
"editorMarkdownInlineMark": "Markdown-Inline-Markup-Syntax",
|
||||
"editorMarkdownInlineMarkTip": "Nach dem Aktivieren wird die Eingabe der Inline-Markup-Syntax <code class='fn__code'>==foo==</code> unterstützt",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown Inline-Durchstreichsyntax",
|
||||
"editorMarkdownInlineStrikethroughTip": "Nach der Aktivierung wird die Eingabe der Inline-Durchstreichsyntax <code class='fn__code'>~~foo~~</code> unterstützt",
|
||||
"editorMarkdownInlineSup": "Markdown Inline-Hochstellungssyntax",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Do not launch automatically",
|
||||
"autoLaunchMode1": "Auto launch after booting",
|
||||
"autoLaunchMode2": "Auto launch and minimize the main interface after booting",
|
||||
"editorMarkdownInlineMark": "Markdown inline mark syntax",
|
||||
"editorMarkdownInlineMarkTip": "After enabling, the <code class='fn__code'>==foo==</code> inline mark syntax input will be supported",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown inline strikethrough syntax",
|
||||
"editorMarkdownInlineStrikethroughTip": "After enabling, the <code class='fn__code'>~~foo~~</code> inline strikethrough syntax input will be supported",
|
||||
"editorMarkdownInlineSup": "Markdown inline superscript syntax",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "No iniciar automáticamente",
|
||||
"autoLaunchMode1": "Inicio automático después del arranque",
|
||||
"autoLaunchMode2": "Iniciar automáticamente y minimizar la interfaz principal después del arranque",
|
||||
"editorMarkdownInlineMark": "Sintaxis de marcado en línea de Markdown",
|
||||
"editorMarkdownInlineMarkTip": "Una vez habilitado, se admitirá la entrada de la sintaxis de marcado en línea <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "Sintaxis de tachado en línea de Markdown",
|
||||
"editorMarkdownInlineStrikethroughTip": "Una vez habilitado, se admitirá la entrada de sintaxis de tachado en línea <code class='fn__code'>~~foo~~</code>",
|
||||
"editorMarkdownInlineSup": "Sintaxis de superíndice en línea de Markdown",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Ne pas lancer automatiquement",
|
||||
"autoLaunchMode1": "Lancement automatique après le démarrage",
|
||||
"autoLaunchMode2": "Lancement automatique et minimisation de l'interface principale après le démarrage",
|
||||
"editorMarkdownInlineMark": "Syntaxe de marquage en ligne Markdown",
|
||||
"editorMarkdownInlineMarkTip": "Une fois activé, la saisie de la syntaxe de marquage en ligne <code class='fn__code'>==foo==</code> sera prise en charge",
|
||||
"editorMarkdownInlineStrikethrough": "Syntaxe de ligne barrée Markdown",
|
||||
"editorMarkdownInlineStrikethroughTip": "Une fois activé, la saisie de la syntaxe de ligne barrée <code class='fn__code'>~~foo~~</code> sera prise en charge",
|
||||
"editorMarkdownInlineSup": "Syntaxe exposant Markdown en ligne",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "אל תצא אוטומטית",
|
||||
"autoLaunchMode1": "צא אוטומטית לאחר אתחול",
|
||||
"autoLaunchMode2": "צא אוטומטית ומזער את הממשק העיקרי לאחר אתחול",
|
||||
"editorMarkdownInlineMark": "תחביר סימון שורת Markdown",
|
||||
"editorMarkdownInlineMarkTip": "לאחר ההפעלה, ייתמך קלט תחביר סימון שורת <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "תחביר קו חוצה בשורת Markdown",
|
||||
"editorMarkdownInlineStrikethroughTip": "לאחר ההפעלה, ייתמך קלט תחביר קו חוצה בשורת <code class='fn__code'>~~foo~~</code>",
|
||||
"editorMarkdownInlineSup": "תחביר עליון בתוך Markdown",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Non avviare automaticamente",
|
||||
"autoLaunchMode1": "Avvio automatico dopo l'accensione",
|
||||
"autoLaunchMode2": "Avvio automatico e minimizzazione dell'interfaccia principale dopo l'accensione",
|
||||
"editorMarkdownInlineMark": "Sintassi di marcatura inline di Markdown",
|
||||
"editorMarkdownInlineMarkTip": "Dopo l'attivazione, sarà supportato l'inserimento della sintassi di marcatura inline <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "Sintassi di barratura in linea di Markdown",
|
||||
"editorMarkdownInlineStrikethroughTip": "Dopo l'attivazione, sarà supportato l'inserimento della sintassi di barratura in linea <code class='fn__code'>~~foo~~</code>",
|
||||
"editorMarkdownInlineSup": "Sintassi Markdown per apice in linea",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "自動的に起動しない",
|
||||
"autoLaunchMode1": "システムの起動後に自動的に起動する",
|
||||
"autoLaunchMode2": "システムの起動後にインターフェースを最小化して自動的に起動する",
|
||||
"editorMarkdownInlineMark": "Markdown インラインマークアップ構文",
|
||||
"editorMarkdownInlineMarkTip": "<code class='fn__code'>==foo==</code> 形式のインラインマークアップ構文を有効にします",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown 行内取り消し線の構文",
|
||||
"editorMarkdownInlineStrikethroughTip": "<code class='fn__code'>~~foo~~</code> 形式のインライン取り消し線構文を有効にします",
|
||||
"editorMarkdownInlineSup": "Markdown インライン上付き文字構文",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Nie uruchamiaj automatycznie",
|
||||
"autoLaunchMode1": "Uruchom automatycznie po włączeniu",
|
||||
"autoLaunchMode2": "Uruchom automatycznie i zminimalizuj główny interfejs po włączeniu",
|
||||
"editorMarkdownInlineMark": "Składnia oznaczeń w Markdown",
|
||||
"editorMarkdownInlineMarkTip": "Po włączeniu będzie obsługiwane wprowadzanie składni oznaczeń <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown składnia przekreślenia",
|
||||
"editorMarkdownInlineStrikethroughTip": "Po włączeniu będzie obsługiwane wprowadzanie składni przekreślenia <code class='fn__code'>~~foo~~</code>",
|
||||
"editorMarkdownInlineSup": "Składnia Markdown dla indeksów dolnych w tekście",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "Не запускать автоматически",
|
||||
"autoLaunchMode1": "Автозапуск после загрузки",
|
||||
"autoLaunchMode2": "Автозапуск и минимизация главного интерфейса после загрузки",
|
||||
"editorMarkdownInlineMark": "Markdown синтаксис встроенной разметки",
|
||||
"editorMarkdownInlineMarkTip": "После включения будет поддерживаться ввод синтаксиса встроенной разметки <code class='fn__code'>==foo==</code>",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown синтаксис зачёркивания",
|
||||
"editorMarkdownInlineStrikethroughTip": "После включения будет поддерживаться ввод синтаксиса зачёркивания <code class='fn__code'>~~foo~~</code>",
|
||||
"editorMarkdownInlineSup": "Markdown синтаксис для надстрочного индекса",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "不自動啟動",
|
||||
"autoLaunchMode1": "開機自動啟動",
|
||||
"autoLaunchMode2": "開機後自動啟動並最小化主介面",
|
||||
"editorMarkdownInlineMark": "Markdown 行級標記語法",
|
||||
"editorMarkdownInlineMarkTip": "啟用後將支持 <code class='fn__code'>==foo==</code> 行級標記語法輸入",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown 行級刪除線語法",
|
||||
"editorMarkdownInlineStrikethroughTip": "啟用後將支持 <code class='fn__code'>~~foo~~</code> 行級刪除線語法輸入",
|
||||
"editorMarkdownInlineSup": "Markdown 行級上標語法",
|
||||
|
@ -62,6 +62,8 @@
|
||||
"autoLaunchMode0": "不自动启动",
|
||||
"autoLaunchMode1": "开机后自动启动",
|
||||
"autoLaunchMode2": "开机后自动启动并最小化主界面",
|
||||
"editorMarkdownInlineMark": "Markdown 行级标记语法",
|
||||
"editorMarkdownInlineMarkTip": "启用后将支持 <code class='fn__code'>==foo==</code> 行级标记语法输入",
|
||||
"editorMarkdownInlineStrikethrough": "Markdown 行级删除线语法",
|
||||
"editorMarkdownInlineStrikethroughTip": "启用后将支持 <code class='fn__code'>~~foo~~</code> 行级删除线语法输入",
|
||||
"editorMarkdownInlineSup": "Markdown 行级上标语法",
|
||||
|
@ -345,6 +345,14 @@ export const editor = {
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineStrikethrough" type="checkbox"${window.siyuan.config.editor.markdown.inlineStrikethrough ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.editorMarkdownInlineMark}
|
||||
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineMarkTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineMark" type="checkbox"${window.siyuan.config.editor.markdown.inlineMark ? " checked" : ""}/>
|
||||
</label>`;
|
||||
},
|
||||
bindEvent: () => {
|
||||
@ -380,7 +388,8 @@ export const editor = {
|
||||
inlineSub: (editor.element.querySelector("#editorMarkdownInlineSub") as HTMLInputElement).checked,
|
||||
inlineTag: (editor.element.querySelector("#editorMarkdownInlineTag") as HTMLInputElement).checked,
|
||||
inlineMath: (editor.element.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked,
|
||||
inlineStrikethrough: (editor.element.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked
|
||||
inlineStrikethrough: (editor.element.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked,
|
||||
inlineMark: (editor.element.querySelector("#editorMarkdownInlineMark") as HTMLInputElement).checked
|
||||
},
|
||||
allowHTMLBLockScript: (editor.element.querySelector("#allowHTMLBLockScript") as HTMLInputElement).checked,
|
||||
justify: (editor.element.querySelector("#justify") as HTMLInputElement).checked,
|
||||
|
@ -25,7 +25,7 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
|
||||
"listItemDotNumberClickFocus", "listItemDotNumberClickFocusTip", "editorMarkdownInlineAsterisk", "editorMarkdownInlineUnderscore",
|
||||
"editorMarkdownInlineSup", "editorMarkdownInlineSupTip", "editorMarkdownInlineSub", "editorMarkdownInlineSubTip",
|
||||
"editorMarkdownInlineTag", "editorMarkdownInlineTagTip", "editorMarkdownInlineMath", "editorMarkdownInlineMathTip",
|
||||
"editorMarkdownInlineStrikethrough", "editorMarkdownInlineStrikethroughTip",
|
||||
"editorMarkdownInlineStrikethrough", "editorMarkdownInlineStrikethroughTip", "editorMarkdownInlineMark", "editorMarkdownInlineMarkTip",
|
||||
"allowHTMLBLockScript", "allowHTMLBLockScriptTip", "backlinkExpandTip", "backmentionExpandTip",
|
||||
"backlinkContainChildren", "backlinkContainChildrenTip"
|
||||
]),
|
||||
|
@ -21,7 +21,8 @@ const setEditor = (modelMainElement: Element) => {
|
||||
inlineSub: (modelMainElement.querySelector("#editorMarkdownInlineSub") as HTMLInputElement).checked,
|
||||
inlineTag: (modelMainElement.querySelector("#editorMarkdownInlineTag") as HTMLInputElement).checked,
|
||||
inlineMath: (modelMainElement.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked,
|
||||
inlineStrikethrough: (modelMainElement.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked
|
||||
inlineStrikethrough: (modelMainElement.querySelector("#editorMarkdownInlineStrikethrough") as HTMLInputElement).checked,
|
||||
inlineMark: (modelMainElement.querySelector("#editorMarkdownInlineMark") as HTMLInputElement).checked
|
||||
};
|
||||
window.siyuan.config.editor.allowHTMLBLockScript = (modelMainElement.querySelector("#allowHTMLBLockScript") as HTMLInputElement).checked;
|
||||
window.siyuan.config.editor.dynamicLoadBlocks = dynamicLoadBlocks;
|
||||
@ -330,6 +331,14 @@ export const initEditor = () => {
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineStrikethrough" type="checkbox"${window.siyuan.config.editor.markdown.inlineStrikethrough ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.editorMarkdownInlineMark}
|
||||
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineMarkTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineMark" type="checkbox"${window.siyuan.config.editor.markdown.inlineMark ? " checked" : ""}/>
|
||||
</label>`,
|
||||
bindEvent(modelMainElement: HTMLElement) {
|
||||
modelMainElement.querySelector("#clearHistory").addEventListener("click", () => {
|
||||
|
@ -31,8 +31,9 @@ export const setLute = (options: ILuteOptions) => {
|
||||
lute.SetSub(window.siyuan.config.editor.markdown.inlineSub);
|
||||
lute.SetTag(window.siyuan.config.editor.markdown.inlineTag);
|
||||
lute.SetInlineMath(window.siyuan.config.editor.markdown.inlineMath);
|
||||
lute.SetGFMStrikethrough(window.siyuan.config.editor.markdown.inlineStrikethrough);
|
||||
lute.SetGFMStrikethrough1(false);
|
||||
lute.SetGFMStrikethrough(window.siyuan.config.editor.markdown.inlineStrikethrough);
|
||||
lute.SetMark(window.siyuan.config.editor.markdown.inlineMark);
|
||||
lute.SetSpin(true);
|
||||
lute.SetProtyleWYSIWYG(true);
|
||||
if (options.lazyLoadImage) {
|
||||
|
@ -225,6 +225,7 @@ export const restoreLuteMarkdownSyntax = (protyle: IProtyle) => {
|
||||
protyle.lute.SetSup(window.siyuan.config.editor.markdown.inlineSup);
|
||||
protyle.lute.SetTag(window.siyuan.config.editor.markdown.inlineTag);
|
||||
protyle.lute.SetInlineUnderscore(window.siyuan.config.editor.markdown.inlineUnderscore);
|
||||
protyle.lute.SetMark(window.siyuan.config.editor.markdown.inlineMark);
|
||||
};
|
||||
|
||||
export const pasteText = async (protyle: IProtyle, textPlain: string, nodeElement: Element, toBlockDOM = true) => {
|
||||
|
4
app/src/types/config.d.ts
vendored
4
app/src/types/config.d.ts
vendored
@ -328,6 +328,10 @@ declare namespace Config {
|
||||
* Whether to enable the inline strikethrough
|
||||
*/
|
||||
inlineStrikethrough: boolean;
|
||||
/**
|
||||
* Whether to enable the inline mark
|
||||
*/
|
||||
inlineMark: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,7 @@ var MarkdownSettings = &Markdown{
|
||||
InlineTag: true,
|
||||
InlineMath: true,
|
||||
InlineStrikethrough: true,
|
||||
InlineMark: true,
|
||||
}
|
||||
|
||||
type Markdown struct {
|
||||
@ -43,6 +44,7 @@ type Markdown struct {
|
||||
InlineTag bool `json:"inlineTag"` // 是否启用行级标签
|
||||
InlineMath bool `json:"inlineMath"` // 是否启用行级公式
|
||||
InlineStrikethrough bool `json:"inlineStrikethrough"` // 是否启用行级删除线
|
||||
InlineMark bool `json:"inlineMark"` // 是否启用行级标记
|
||||
}
|
||||
|
||||
func NewLute() (ret *lute.Lute) {
|
||||
@ -64,6 +66,7 @@ func NewLute() (ret *lute.Lute) {
|
||||
ret.SetTag(MarkdownSettings.InlineTag)
|
||||
ret.SetInlineMath(MarkdownSettings.InlineMath)
|
||||
ret.SetGFMStrikethrough(MarkdownSettings.InlineStrikethrough)
|
||||
ret.SetMark(MarkdownSettings.InlineMark)
|
||||
ret.SetInlineMathAllowDigitAfterOpenMarker(true)
|
||||
ret.SetGFMStrikethrough1(false)
|
||||
ret.SetFootnotes(false)
|
||||
|
Loading…
Reference in New Issue
Block a user