mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
474a490f32
commit
dc90ac1ec7
4 changed files with 8 additions and 4 deletions
|
|
@ -226,7 +226,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
||||||
<span data-type="av-search-icon" class="block__icon">
|
<span data-type="av-search-icon" class="block__icon">
|
||||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||||
</span>
|
</span>
|
||||||
<div style="position: relative">
|
<div style="position: relative" class="fn__flex">
|
||||||
<input style="${isSearching || query ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}">
|
<input style="${isSearching || query ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}">
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
|
|
@ -354,6 +354,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
||||||
addClearButton({
|
addClearButton({
|
||||||
inputElement: searchInputElement,
|
inputElement: searchInputElement,
|
||||||
right: 0,
|
right: 0,
|
||||||
|
width: "1em",
|
||||||
height: searchInputElement.clientHeight,
|
height: searchInputElement.clientHeight,
|
||||||
clearCB() {
|
clearCB() {
|
||||||
viewsElement.classList.remove("av__views--show");
|
viewsElement.classList.remove("av__views--show");
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ import {blockRender} from "../render/blockRender";
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
import {getAllModels} from "../../layout/getAll";
|
import {getAllModels} from "../../layout/getAll";
|
||||||
import {pushBack} from "../../util/backForward";
|
import {pushBack} from "../../util/backForward";
|
||||||
import {openFileById, openLink} from "../../editor/util";
|
import {openFileById} from "../../editor/util";
|
||||||
import {openGlobalSearch} from "../../search/util";
|
import {openGlobalSearch} from "../../search/util";
|
||||||
/// #else
|
/// #else
|
||||||
import {popSearch} from "../../mobile/menu/search";
|
import {popSearch} from "../../mobile/menu/search";
|
||||||
|
|
@ -90,6 +90,7 @@ import {
|
||||||
updateCellsValue
|
updateCellsValue
|
||||||
} from "../render/av/cell";
|
} from "../render/av/cell";
|
||||||
import {openEmojiPanel, unicode2Emoji} from "../../emoji";
|
import {openEmojiPanel, unicode2Emoji} from "../../emoji";
|
||||||
|
import {openLink} from "../../editor/openLink";
|
||||||
|
|
||||||
export class WYSIWYG {
|
export class WYSIWYG {
|
||||||
public lastHTMLs: { [key: string]: string } = {};
|
public lastHTMLs: { [key: string]: string } = {};
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import {newFileContentBySelect, rename, replaceFileName} from "../../editor/rena
|
||||||
import {insertEmptyBlock, jumpToParent} from "../../block/util";
|
import {insertEmptyBlock, jumpToParent} from "../../block/util";
|
||||||
import {isLocalPath} from "../../util/pathName";
|
import {isLocalPath} from "../../util/pathName";
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
import {openBy, openFileById, openLink} from "../../editor/util";
|
import {openBy, openFileById} from "../../editor/util";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {
|
import {
|
||||||
alignImgCenter,
|
alignImgCenter,
|
||||||
|
|
@ -66,6 +66,7 @@ import {removeSearchMark} from "../toolbar/util";
|
||||||
import {avKeydown} from "../render/av/keydown";
|
import {avKeydown} from "../render/av/keydown";
|
||||||
import {checkFold} from "../../util/noRelyPCFunction";
|
import {checkFold} from "../../util/noRelyPCFunction";
|
||||||
import {AIActions} from "../../ai/actions";
|
import {AIActions} from "../../ai/actions";
|
||||||
|
import {openLink} from "../../editor/openLink";
|
||||||
|
|
||||||
export const getContentByInlineHTML = (range: Range, cb: (content: string) => void) => {
|
export const getContentByInlineHTML = (range: Range, cb: (content: string) => void) => {
|
||||||
let html = "";
|
let html = "";
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,13 @@ export const addClearButton = (options: {
|
||||||
inputElement: HTMLInputElement,
|
inputElement: HTMLInputElement,
|
||||||
clearCB?: () => void,
|
clearCB?: () => void,
|
||||||
right?: number,
|
right?: number,
|
||||||
|
width?: string,
|
||||||
height?: number
|
height?: number
|
||||||
className?: string
|
className?: string
|
||||||
}) => {
|
}) => {
|
||||||
options.inputElement.dataset.oldPaddingRight = options.inputElement.style.paddingRight;
|
options.inputElement.dataset.oldPaddingRight = options.inputElement.style.paddingRight;
|
||||||
options.inputElement.insertAdjacentHTML("afterend",
|
options.inputElement.insertAdjacentHTML("afterend",
|
||||||
`<svg class="${options.className || "b3-form__icon-clear"} ariaLabel" aria-label="${window.siyuan.languages.clear}" style="${options.right ? "right: " + options.right + "px;" : ""}${options.height ? "height:" + options.height + "px" : ""}">
|
`<svg class="${options.className || "b3-form__icon-clear"} ariaLabel" aria-label="${window.siyuan.languages.clear}" style="${options.right ? "right: " + options.right + "px;" : ""}${options.height ? "height:" + options.height + "px;" : ""}${options.width ? "width:" + options.width : ""}">
|
||||||
<use xlink:href="#iconCloseRound"></use></svg>`);
|
<use xlink:href="#iconCloseRound"></use></svg>`);
|
||||||
const clearElement = options.inputElement.nextElementSibling;
|
const clearElement = options.inputElement.nextElementSibling;
|
||||||
clearElement.addEventListener("click", () => {
|
clearElement.addEventListener("click", () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue