Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

caption字段无法显示多行文本内容问题 #20

Open
dongrentianyu opened this issue Apr 19, 2023 · 10 comments
Open

caption字段无法显示多行文本内容问题 #20

dongrentianyu opened this issue Apr 19, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@dongrentianyu
Copy link

今天学编程的时候,制卡,然后在caption里写了很多行代码,但效果不是很好,会直接清楚换行符,变成一行内容。

image

image

image

不知道咋滚动截屏,就多截几张了,就算我加上```三个这样的换行符,效果也不好。

我感觉这是一个挺严重的问题,因为不能多行文本,那提问题就会有所限制,但我也不知道应该怎样解决,因为这可能是太微原生字段设计就是这样设计的,除非让这个字段可以有和text一样,允许多行文本存在。如果是用其他方式,比如json格式存在,然后再转换成多行的文本形式,或许可以。

@dongrentianyu
Copy link
Author

那可能就需要特殊字段了,不过我觉得这两者可以分开来,也就是存在多行文本的时候,用特殊字段,特殊方式解决。一般情况下的单行文本就直接用caption字段了

@dongrentianyu
Copy link
Author

如果没有特别好的解决办法,那就只能先把这部分的内容写成一个条目,再嵌入回去显示了。

@oflg
Copy link
Owner

oflg commented Apr 19, 2023

确实,这个bug挺严重,我找时间看看怎么修。

@dongrentianyu
Copy link
Author

有一种可尝试的办法是卡片的正面与反面都放在正文里,前后加上特殊分隔符来区分,这样就什么也不影响了。然后加上特定字段进行解析成抽认卡或者现在这种复习的形式。

@dongrentianyu
Copy link
Author

不知道为什么,我总感觉自己在提一些很愚蠢的问题,明明自己可以解决的,却还要麻烦别人。

image

image

如果需要多行文本,那就用<br/>来表示一下换行。

image

dwgc甚至直接这样写,在编辑时不换行也没问题,不过还是换行吧,更容易阅读。

@dongrentianyu
Copy link
Author

dongrentianyu commented Apr 22, 2023

应该说没什么问题了,可能需要在tiddlymemo的网站上说明一下,不然其他人可能会误解了。我就不关闭了。

@dongrentianyu
Copy link
Author

image

image

但有一个问题,就是调整caption标题层级就显示得不好看。我觉得不要用h2或h1,这种标题层级来设置caption内容。应该直接规定字体多大。我试试写个样式能不能解决。

@dongrentianyu
Copy link
Author

这是讨论caption字段规格的问题,就不继续在这里讨论了

@dongrentianyu
Copy link
Author

dongrentianyu commented Apr 29, 2023

这个功能最好是独立出来,这样就不影响现在的卡片条目。也方便增加功能。但不是说独立成插件,而是让用户再添加一些其他标签,或者某种字段,表示这是一个多行文本的卡片。

@oflg
Copy link
Owner

oflg commented May 6, 2023

感谢反馈!下次更新,解决这个问题,请耐心等待。

@oflg oflg added the bug Something isn't working label May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants