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">
|
||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||
</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}">
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
|
@ -354,6 +354,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
|||
addClearButton({
|
||||
inputElement: searchInputElement,
|
||||
right: 0,
|
||||
width: "1em",
|
||||
height: searchInputElement.clientHeight,
|
||||
clearCB() {
|
||||
viewsElement.classList.remove("av__views--show");
|
||||
|
|
|
@ -57,7 +57,7 @@ import {blockRender} from "../render/blockRender";
|
|||
/// #if !MOBILE
|
||||
import {getAllModels} from "../../layout/getAll";
|
||||
import {pushBack} from "../../util/backForward";
|
||||
import {openFileById, openLink} from "../../editor/util";
|
||||
import {openFileById} from "../../editor/util";
|
||||
import {openGlobalSearch} from "../../search/util";
|
||||
/// #else
|
||||
import {popSearch} from "../../mobile/menu/search";
|
||||
|
@ -90,6 +90,7 @@ import {
|
|||
updateCellsValue
|
||||
} from "../render/av/cell";
|
||||
import {openEmojiPanel, unicode2Emoji} from "../../emoji";
|
||||
import {openLink} from "../../editor/openLink";
|
||||
|
||||
export class WYSIWYG {
|
||||
public lastHTMLs: { [key: string]: string } = {};
|
||||
|
|
|
@ -38,7 +38,7 @@ import {newFileContentBySelect, rename, replaceFileName} from "../../editor/rena
|
|||
import {insertEmptyBlock, jumpToParent} from "../../block/util";
|
||||
import {isLocalPath} from "../../util/pathName";
|
||||
/// #if !MOBILE
|
||||
import {openBy, openFileById, openLink} from "../../editor/util";
|
||||
import {openBy, openFileById} from "../../editor/util";
|
||||
/// #endif
|
||||
import {
|
||||
alignImgCenter,
|
||||
|
@ -66,6 +66,7 @@ import {removeSearchMark} from "../toolbar/util";
|
|||
import {avKeydown} from "../render/av/keydown";
|
||||
import {checkFold} from "../../util/noRelyPCFunction";
|
||||
import {AIActions} from "../../ai/actions";
|
||||
import {openLink} from "../../editor/openLink";
|
||||
|
||||
export const getContentByInlineHTML = (range: Range, cb: (content: string) => void) => {
|
||||
let html = "";
|
||||
|
|
|
@ -15,12 +15,13 @@ export const addClearButton = (options: {
|
|||
inputElement: HTMLInputElement,
|
||||
clearCB?: () => void,
|
||||
right?: number,
|
||||
width?: string,
|
||||
height?: number
|
||||
className?: string
|
||||
}) => {
|
||||
options.inputElement.dataset.oldPaddingRight = options.inputElement.style.paddingRight;
|
||||
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>`);
|
||||
const clearElement = options.inputElement.nextElementSibling;
|
||||
clearElement.addEventListener("click", () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue