您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the title of each advanced mention’s target entity in Summernote, next to the entity ID (or in a tooltip on hover).
当前为
This Kanka script adds a small reminder of the targeted entity’s name to all advanced mentions in Summernote’s visual editor. This way, you don’t have to go back and view the entity to figure out what each mention points to. This script runs only once when the editor is loaded, so changes will not be reflected and new mentions won’t get a tooltip immediately. If there is demand, I may add a toolbar button to regenerate the tooltips during an editing session.
Note that this feature does not "work" in the code view as that editor contains only plain text and a tooltip cannot be attached to an arbitrary part of the text; however, you will see a dfn
tag around your mentions’s entity type and ID, like so:
[<dfn entity-id="494047" title="Ragnar Lokra">character:494047</dfn>|Alternate Text]
You can therefore refer to the title
attribute to find the target entity’s name. (Since <dfn> is not whitelisted on Kanka, those tags will not be saved when the form is submitted and you don’t have to worry about it affecting your mentions.)
If you wish to style the mentions differently, you can use the following CSS selector:
.note-editable dfn {}
Alternatively, you can uncomment the last part of the CSS at the end of the script, where it says Uncomment this to show only a tooltip, and no superscript, to do exactly that :) By default, this replacement rule will underline the hoverable part of the mention instead to remind you that a tooltip is available.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址