-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Supports replacing tags with other inline elements #11238
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
Comments
我只尝试了行级标签,其他行级元素不知道支不支持替换 |
刚刚发现,如果实现了搜索替换支持转换元素类型,理论上就能直接实现 块引用与标签互转 · Issue #11026 · siyuan-note/siyuan 了 |
目前替换标签内容有 bug 导致替换失败,但修复 bug 以后也只能支持替换标签内容,不支持替换类型。 |
意思就是说不能把标签替换为纯文本? |
是的,目前只能替换内容,要改变类型的话还没想到适合的方案。 |
我突然想到让搜索输入框支持富文本 |
支持不了的,数据库里面没有存 DOM,无法匹配到的,另外好像没有应用的搜索这样做吧,不一定好用。 |
富文本不行那就只能靠匹配 Markdown 了,感觉可以增加一种搜索模式是有 Markdown 标记符的 |
SQL 搜索吧 |
@88250 这个是同样的问题吗? 如果替换的内容中包含行级元素,则无法替换成功: |
基本是同一个问题,元素交叉的情况更复杂些。 |
评估了下要做行级元素替换的话情况比较复杂,先实现标签转换纯文本吧。 |
两个问题:
video.webm |
|
改进了一下,已经可以支持将标签替换为其他行级元素了(不只是块引元素): 原文: 替换: 结果: |
替换为块引用之后块引计数好像不会更新 |
我这里测试正常 |
我这里看起来不正常 video.webm |
文档树上的确实有点问题,稍后看看如何改进,谢谢。 |
能在标签的右击菜单里增加个转换为块引用功能吗?藏在替换功能里感觉有点麻烦了。直接标签右击->转换为块引用->然后弹个窗->填目标块id确认后就替换 |
思源本体做这个不合适,等插件实现吧 |
Uh oh!
There was an error while loading. Please reload this page.
行级标签支持替换为纯文本
In what scenarios do you need this feature?
侧边栏里目前只有重命名和删除,做不到删除标签还留下行级标签的文本:
在搜索里替换又没有效果:
Describe the optimal solution
行级标签支持批量转换为文本
Describe the candidate solution
No response
Other information
备注:#11058
The text was updated successfully, but these errors were encountered: