mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 00:50:56 +08:00
This commit is contained in:
parent
d3878e947c
commit
a7a77c4ebb
@ -51,9 +51,6 @@ export const fontMenu = (protyle: IProtyle) => {
|
||||
lastFonts.forEach((item: string) => {
|
||||
const lastFontStatus = item.split(Constants.ZWSP);
|
||||
switch (lastFontStatus[0]) {
|
||||
case "remove":
|
||||
lastColorHTML += `<button style="margin-right: 4px" data-type="remove" class="b3-button--outline b3-button b3-button--small">${window.siyuan.languages.clearFontStyle}</button>`;
|
||||
break;
|
||||
case "color":
|
||||
lastColorHTML += `<button class="b3-color__square" data-type="color" style="background-color:${lastFontStatus[1]}"></button>`;
|
||||
break;
|
||||
@ -82,10 +79,6 @@ export const fontMenu = (protyle: IProtyle) => {
|
||||
<div class="fn__flex">
|
||||
<button data-type="style2" class="protyle-font__style" style="-webkit-text-stroke: 0.2px var(--b3-theme-on-background);-webkit-text-fill-color : transparent;">${window.siyuan.languages.hollow}</button>
|
||||
<button data-type="style4" class="protyle-font__style" style="text-shadow: 1px 1px var(--b3-border-color), 2px 2px var(--b3-border-color), 3px 3px var(--b3-border-color), 4px 4px var(--b3-border-color)">${window.siyuan.languages.shadow}</button>
|
||||
<span class="fn__space fn__flex-1"></span>
|
||||
<button data-type="remove" class="b3-button--outline b3-button b3-button--small">
|
||||
${window.siyuan.languages.clearFontStyle}
|
||||
</button>
|
||||
</div>`;
|
||||
element.addEventListener(getEventName(), function (event: Event) {
|
||||
let target = event.target as HTMLElement;
|
||||
|
@ -537,7 +537,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
if (previousSibling && previousSibling.nodeType !== 3 && previousSibling.getAttribute("data-type").indexOf("inline-math") > -1) {
|
||||
protyle.toolbar.showRender(protyle, previousSibling);
|
||||
return;
|
||||
} else if (!previousSibling && range.startContainer.parentElement.previousSibling.isSameNode(range.startContainer.parentElement.previousElementSibling) &&
|
||||
} else if (!previousSibling &&
|
||||
range.startContainer.parentElement.previousSibling && range.startContainer.parentElement.previousSibling.isSameNode(range.startContainer.parentElement.previousElementSibling) &&
|
||||
range.startContainer.parentElement.previousElementSibling.getAttribute("data-type").indexOf("inline-math") > -1) {
|
||||
protyle.toolbar.showRender(protyle, range.startContainer.parentElement.previousElementSibling);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user