Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
41d03c92b9
5 changed files with 16 additions and 5 deletions
|
@ -85,11 +85,16 @@ export class Title {
|
|||
}
|
||||
if (matchHotKey("⇧⌘V", event)) {
|
||||
navigator.clipboard.readText().then(textPlain => {
|
||||
// 对 HTML 标签进行内部转义,避免被 Lute 解析以后变为小写 https://github.com/siyuan-note/siyuan/issues/10620
|
||||
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
|
||||
const content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
|
||||
let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
|
||||
// 移除 ;;;lt;;; 和 ;;;gt;;; 转义及其包裹的内容
|
||||
content = content.replace(/;;;lt;;;[^;]+;;;gt;;;/g, "");
|
||||
document.execCommand("insertText", false, replaceFileName(content));
|
||||
this.rename(protyle);
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.general.enterBack.custom, event)) {
|
||||
const ids = protyle.path.split("/");
|
||||
|
@ -235,7 +240,9 @@ export class Title {
|
|||
click: async () => {
|
||||
navigator.clipboard.readText().then(textPlain => {
|
||||
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
|
||||
const content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
|
||||
let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
|
||||
// 移除 ;;;lt;;; 和 ;;;gt;;; 转义及其包裹的内容
|
||||
content = content.replace(/;;;lt;;;[^;]+;;;gt;;;/g, "");
|
||||
document.execCommand("insertText", false, replaceFileName(content));
|
||||
this.rename(protyle);
|
||||
});
|
||||
|
|
|
@ -168,9 +168,10 @@ export const pasteAsPlainText = async (protyle: IProtyle) => {
|
|||
if (localFiles.length === 0) {
|
||||
// Inline-level elements support pasted as plain text https://github.com/siyuan-note/siyuan/issues/8010
|
||||
navigator.clipboard.readText().then(textPlain => {
|
||||
// 对 HTML 标签进行内部转移,避免被 Lute 解析以后变为小写 https://github.com/siyuan-note/siyuan/issues/10620
|
||||
// 对 HTML 标签进行内部转义,避免被 Lute 解析以后变为小写 https://github.com/siyuan-note/siyuan/issues/10620
|
||||
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
|
||||
const content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
|
||||
// insertHTML 会进行内部反转义
|
||||
insertHTML(content, protyle);
|
||||
filterClipboardHint(protyle, textPlain);
|
||||
});
|
||||
|
|
|
@ -106,10 +106,11 @@ type TableColumn struct {
|
|||
// 以下是某些列类型的特有属性
|
||||
|
||||
Options []*SelectOption `json:"options,omitempty"` // 选项列表
|
||||
NumberFormat NumberFormat `json:"numberFormat"` // 列数字格式化
|
||||
Template string `json:"template"` // 模板内容
|
||||
NumberFormat NumberFormat `json:"numberFormat"` // 数字列格式化
|
||||
Template string `json:"template"` // 模板列内容
|
||||
Relation *Relation `json:"relation,omitempty"` // 关联列
|
||||
Rollup *Rollup `json:"rollup,omitempty"` // 汇总列
|
||||
Date *Date `json:"date,omitempty"` // 日期设置
|
||||
}
|
||||
|
||||
type TableCell struct {
|
||||
|
|
|
@ -875,6 +875,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
|||
Template: key.Template,
|
||||
Relation: key.Relation,
|
||||
Rollup: key.Rollup,
|
||||
Date: key.Date,
|
||||
Wrap: col.Wrap,
|
||||
Hidden: col.Hidden,
|
||||
Width: col.Width,
|
||||
|
|
|
@ -655,6 +655,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
|
|||
Template: key.Template,
|
||||
Relation: key.Relation,
|
||||
Rollup: key.Rollup,
|
||||
Date: key.Date,
|
||||
Wrap: col.Wrap,
|
||||
Hidden: col.Hidden,
|
||||
Width: col.Width,
|
||||
|
|
Loading…
Add table
Reference in a new issue