We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
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
想通过 JS 实现禁止关闭特定页签的功能,需要按文档 id 找到页签
在写一个代码片段,要判断最后聚焦的文档页签所在的笔记本。
需要思源在页签元素上添加一个属性,值是笔记本 id(如果页签不是文档的话就不需要添加这个属性了):
p.s. 属性名可以叫 data-box 之类的 p.s.s. 其实值是 path 也行,毕竟 path 的开头就是笔记本 id
data-box
当然,如果有其他方便的办法能获取最后聚焦的文档页签所在的笔记本,这个属性可能就没必要加了
The text was updated successfully, but these errors were encountered:
使用 getAllModels 获取编辑器页签对象,需要的值都在里面了。
getAllModels
Sorry, something went wrong.
Vanessa219
No branches or pull requests
01 添加一个属性,值是文档 id
想通过 JS 实现禁止关闭特定页签的功能,需要按文档 id 找到页签
02 添加一个属性,值是笔记本 id
在写一个代码片段,要判断最后聚焦的文档页签所在的笔记本。
需要思源在页签元素上添加一个属性,值是笔记本 id(如果页签不是文档的话就不需要添加这个属性了):
p.s. 属性名可以叫
data-box
之类的p.s.s. 其实值是 path 也行,毕竟 path 的开头就是笔记本 id
当然,如果有其他方便的办法能获取最后聚焦的文档页签所在的笔记本,这个属性可能就没必要加了
The text was updated successfully, but these errors were encountered: