mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-12 23:46:13 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ab18a537f6
23 changed files with 66 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue