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

增加文本上注音功能(基于html <ruby>标签实现) #3042

Closed
HowcanoeWang opened this issue Oct 3, 2021 · 4 comments
Closed

增加文本上注音功能(基于html <ruby>标签实现) #3042

HowcanoeWang opened this issue Oct 3, 2021 · 4 comments

Comments

@HowcanoeWang
Copy link

HowcanoeWang commented Oct 3, 2021

In what scenarios do you need this function?

当进行语言学习的时候(中文生字或者日文汉字),需要在文本中对文字进行注音以方便阅读记忆,效果如下:

我们来看看 beijing 的注音方法

这个是可以通过原生的HTML标签就能实现的,不需要任何JS和CSS样式:

<ruby><rp></rp><rt>bei</rt><rp></rp><rp></rp><rt>jing</rt><rp></rp>
</ruby>

tag标签的一些说明:

  • <ruby> — 用它将需要注释或注音标的文字内容包围住。
  • <rt> — 这里面放置音标或注释,这个标记要跟在需要注释的文本后边。
  • <rp> — (完全不用在思源中考虑)这个标记是防备那些不支持ruby标记的浏览器,主要用来放置括弧。对于支持这个标记的浏览器,rp标记的CSS样式是{display:none;},也就是不可见。

希望可以在工具栏里面增加一个按钮,用来标注选中的文本注音
EJFJRTVJ@4X3RUS 52Y_3I1

然后弹出来类似公式那样的输入框,把标注输进去,以<ruby>标签进行数据保存并渲染

参考:
HTML拼音/音标注释标记ruby和它的子元素rt/rp

@88250
Copy link
Member

88250 commented Oct 3, 2021

感谢提议,但是短期内应该不会支持,先保持打开,后面有时间再搞。

@88250
Copy link
Member

88250 commented Jan 19, 2022

这个需求现阶段暂时不考虑了,感谢理解。

@88250 88250 closed this as completed Jan 19, 2022
@HowcanoeWang
Copy link
Author

这个需求现阶段暂时不考虑了,感谢理解。

希望后续能支持html块,学日语有这个功能会方面很多

@88250
Copy link
Member

88250 commented Mar 12, 2022

v1.9.0 支持 HTML 块 #4023

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants