Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve merging of adjacent inline elements #12033

Closed
TCOTC opened this issue Jul 20, 2024 · 16 comments
Closed

Improve merging of adjacent inline elements #12033

TCOTC opened this issue Jul 20, 2024 · 16 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Jul 20, 2024

改进合并相邻元素

按了 之后输入文本是正常的,但插入标签就会合并到一起:

default.webm
@88250
Copy link
Member

88250 commented Aug 5, 2024

这个是特性,不使用空格分隔的话相邻的标签元素会自动合并为一个。

@88250 88250 closed this as completed Aug 5, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented Aug 5, 2024

这个特性的使用场景在哪里?

@88250
Copy link
Member

88250 commented Aug 5, 2024

方便和并相邻的元素,另一方面也为了防止 ## 相邻导致解析问题。

@TCOTC
Copy link
Contributor Author

TCOTC commented Aug 5, 2024

那这种情况下是不是应该直接合并,而不是刷新之后再合并?否则用户会认为这是两个标签,但下次打开又变成一个标签了

default.webm

@88250
Copy link
Member

88250 commented Aug 5, 2024

@Vanessa219 有空看一下

@TCOTC TCOTC changed the title 无法连续插入标签 及时合并相邻元素 Aug 5, 2024
@TCOTC TCOTC changed the title 及时合并相邻元素 改进合并相邻元素 Aug 22, 2024
@TCOTC
Copy link
Contributor Author

TCOTC commented Aug 22, 2024

@88250 想了想还是很反直觉,有没有办法让相邻的 tag 元素不合并?

image

@TCOTC
Copy link
Contributor Author

TCOTC commented Sep 28, 2024

@Vanessa219

@88250
Copy link
Member

88250 commented Sep 29, 2024

想了想还是很反直觉,有没有办法让相邻的 tag 元素不合并?

没有办法,设计如此。

@TCOTC
Copy link
Contributor Author

TCOTC commented Sep 29, 2024

前面这条还要看看

image

@Vanessa219
Copy link
Member

@88250 可能需要你修改一下 SpinBlockDOM

SpinBlockDOM - argument: <div data-node-id="20240929164110-v4wr44n" data-node-index="1" data-type="NodeParagraph" class="p" updated="20240929182757"><div contenteditable="true" spellcheck="false">​<span data-type="tag">​!剪藏</span>​<span data-type="tag">​tag</span>​ <wbr></div><div class="protyle-attr" contenteditable="false">​</div></div>
SpinBlockDOM - result: <div data-node-id="20240929164110-v4wr44n" data-node-index="1" data-type="NodeParagraph" class="p" updated="20240929182757"><div contenteditable="true" spellcheck="false">​<span data-type="tag">​!剪藏tag</span>​ <wbr></div><div class="protyle-attr" contenteditable="false">​</div></div>

@88250
Copy link
Member

88250 commented Sep 29, 2024

这个就是设计上需要合并的,不再做调整了。

@TCOTC
Copy link
Contributor Author

TCOTC commented Sep 29, 2024

那这种情况下是不是应该直接合并,而不是刷新之后再合并?否则用户会认为这是两个标签,但下次打开又变成一个标签了

那这个嘞?

@88250
Copy link
Member

88250 commented Sep 29, 2024

调试了下,V 说的这个可以改,稍后调整。

@88250 88250 self-assigned this Sep 29, 2024
88250 added a commit to 88250/lute that referenced this issue Sep 29, 2024
@88250

This comment was marked as outdated.

@TCOTC
Copy link
Contributor Author

TCOTC commented Oct 1, 2024

合并元素之后光标会跑到开头:

default.webm

@88250
Copy link
Member

88250 commented Oct 1, 2024

感谢反馈,稍后继续改进。

88250 added a commit to 88250/lute that referenced this issue Oct 1, 2024
88250 added a commit that referenced this issue Oct 1, 2024
@88250 88250 added this to the 3.1.9 milestone Oct 1, 2024
@88250 88250 changed the title 改进合并相邻元素 Improve merging of adjacent inline elements Oct 1, 2024
TCOTC added a commit to TCOTC/siyuan that referenced this issue Oct 4, 2024
* 📝 Improve user guide ignore search chapter fix siyuan-note#12032 (siyuan-note#12663)

* 🎨 Improve search ignore result count siyuan-note#12662

* ⬆️ Upgrade lute siyuan-note#12033

* 🎨 Improve performance of exporting .sy.zip for notebook siyuan-note#12653

* 🎨 Improve database primary key content update for bound container blocks siyuan-note#12664

* 🐛 Search ignore is not working in some cases

* 🎨 Improve HTML code block clipping for https://ld246.com siyuan-note#12678

* 🎨 Automatically refresh reference counts after deleting or rolling back a document siyuan-note#12682

* ⬆️ Upgrade lute siyuan-note#12677

---------

Co-authored-by: Daniel <845765@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants