导出的标注不能被 Text Transporter 右键复制
请描述你的问题
Obsidian 模板 · 标注嵌入模式版: 导出的标注内容不支持 ob 插件 Text Transporter 的右键复制,有什么办法吗

去掉最前面的 [!srhl6] 就可以复制了,但去掉 [!srhl6] 样式不好看😂 ,而且去掉后就点击链接就不是在ob内部打开标注页面了

我没理解你的问题,或者说我这边没有问题。

用了这个Obsidian 模板 · 标注嵌入模式版标注模板后,我在 ob 编辑模板下右键,选择 Copy block embeds from this selection 或 Copy block embeds as an alias 并不能复制出引用来,剪切板没有任何新内容。把标注这块内容里开关的[!srhl6]去掉就可以复制出引用来了。不知道我这样描述清楚没。😂
描述清楚了 😂 确实如此,我研究下,估计 Obsidian 某个版本升级造成的...
描述清楚了 😂 确实如此,我研究下,估计 Obsidian 某个版本升级造成的...
好巧,今天上来提issue正好碰到这个问题,我之前提过这个,是由于模板本身造成的,详见https://github.com/Kenshin/simpread/issues/4556#issuecomment-1268252655
@CanoNandMacaroN
哦,确实如此 😂 我忘了修复了,已修复。
@iblogc 试试 https://github.com/Kenshin/simpread/issues/4556 提到的方案。
@Kenshin 这个解决方案我这个问题里提到过,但是会有两个新问题,一个是这样改了后ob上的显示样式有些丑,二是更重要的去掉开头的[!srhl2]后标注页面不内嵌了(点击之后是打开了系统浏览器而不是在ob内右侧打开标注页面)
我测试出来的不是换行导致的问题,是标注内容开头的[!srhl2]导致的,只要删除这个就可以复制出 Block ID。问题就是会出现上面说的两个问题
PS:而且K大,放到Obsidian 模板 · 标注嵌入模式里修复后的标注模板和 Obsidian 模板 · 高度定制版的标注模板一模一样😂


这个问题我还真没发现,刚才我看了一下,obsidian目前不支持callout引用块的直接复制,所以很显然,只要包含了callout语法,text transport插件就不支持复制了,因为其只是快捷调用了obsidian的api,目前通过插件快速引用是无解了。但是obsdian的块引用语法依旧是生效的,所以可以通过直接输入块链接ID的方法实现,具体操作:
所以我建议把块ID放到callout块外方便复制,或者直接不使用带有callout块的模板。
我之前是理解错了,模板应该是没有问题的🤪
至于想要内嵌页面又不在意callout块的话可以用下面这个修改过的模板:
<%
let colors = [ '#B4D9FB', '#ffeb3b', '#a2e9f2', '#a1e0ff', '#a8ea68', '#ffb7da' ],
color = colors[ annote.color ];
let iframeURI = "http://localhost:7026/unread/"+unread.idx+"#id="+annote.id
if (unread.note && unread.title != unread.note) {
var filetitle = unread.note;
}
else {
var filetitle = unread.title;
}
let wikilinks = "[[SR" + unread.idx + "@" + filetitle + "|📄]]";
-%>
<% if (annote.note.startsWith("######")) { %>
<%
let note = annote.note.slice(7);
-%>
###### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("######")) { %>
<%
let note = annote.note.slice(6);
-%>
###### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("####")) { %>
<%
let note = annote.note.slice(5);
-%>
#### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else if (annote.note.startsWith("###")) { %>
<%
let note = annote.note.slice(4);
-%>
### <% if (note) { %><%- note %><% } else { %>{{an_text}}<% } %>
<% } else { %>
> <%- wikilinks %> <mark style="background-color: <%= color %>">Highlights</mark> [🧷](<<%= iframeURI %>>) [🌐](<{{an_ext_uri}}>) {{#|an_tag| }}
{{{html_format|>|{{an_html}}}}}
<% if (annote.refs) { -%>
{{> - 🔗|an_refs}}
<% } -%>
<% if (annote.note) { -%>
<% if (annote.note.startsWith("todo:") == false) { -%>
>
> - 📝{{an_note}}
^sran-{{an_id}}
<% } else { -%>
<%
let note = annote.note.slice(6);
-%>
^sran-{{an_id}}
- [ ] <%- note %> #web ^srtask-{{an_id}}
<% } -%>
<% } else { %>
^sran-{{an_id}}
<% } -%>
<% } -%>
@iblogc
看下「解决方案」 https://github.com/Kenshin/simpread/issues/4556#issuecomment-1328190020
@Kenshin @CanoNandMacaroN 感谢,既然目前没有 callout 块的 解决方法我就回到最初了,不过学到了可以通过![[^^检索😀
之前研究了下
Callout 不能通过 text transport 复制。 😂