Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-10-26 18:46:49 +08:00
commit ab5d546c6a
2 changed files with 3 additions and 3 deletions

View file

@ -1698,7 +1698,7 @@ export class Gutter {
iconHTML: "",
checked: !nodeElement.getAttribute("custom-heading-mode"),
click() {
nodeElement.setAttribute("custom-heading-mode", "0");
nodeElement.removeAttribute("custom-heading-mode");
fetchPost("/api/attr/setBlockAttrs", {
id,
attrs: {"custom-heading-mode": ""}

View file

@ -303,8 +303,8 @@ func resolveEmbedR(n *ast.Node, blockEmbedMode int, luteEngine *lute.Lute, resol
h := treenode.GetNodeInTree(subTree, sqlBlock.ID)
var hChildren []*ast.Node
// 从嵌入块的 IAL 属性中解析 custom-heading-mode默认值为 0
blockHeadingMode := 0 // 默认值
// 从嵌入块的 IAL 属性中解析 custom-heading-mode使用全局配置作为默认值
blockHeadingMode := Conf.Editor.HeadingEmbedMode
if customHeadingMode := n.IALAttr("custom-heading-mode"); "" != customHeadingMode {
if mode, err := strconv.Atoi(customHeadingMode); nil == err && (mode == 0 || mode == 1 || mode == 2) {
blockHeadingMode = mode