mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 当自定义排序时支持在文档上/下新建同级文档 https://github.com/siyuan-note/siyuan/issues/5098
This commit is contained in:
parent
d4602433c5
commit
b40b460f0c
2 changed files with 16 additions and 3 deletions
|
|
@ -920,7 +920,7 @@ func DuplicateDoc(rootID string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func CreateDocByMd(boxID, p, title, md string) (err error) {
|
||||
func CreateDocByMd(boxID, p, title, md string, sorts []string) (err error) {
|
||||
WaitForWritingFiles()
|
||||
|
||||
box := Conf.Box(boxID)
|
||||
|
|
@ -930,7 +930,13 @@ func CreateDocByMd(boxID, p, title, md string) (err error) {
|
|||
|
||||
luteEngine := NewLute()
|
||||
dom := luteEngine.Md2BlockDOM(md)
|
||||
return createDoc(box.ID, p, title, dom)
|
||||
err = createDoc(box.ID, p, title, dom)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
ChangeFileTreeSort(box.ID, sorts)
|
||||
return
|
||||
}
|
||||
|
||||
func CreateWithMarkdown(boxID, hPath, md string) (id string, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue