Add Hyperlink [Official thread]

I’m not sure if this is what you mean by embedding, but you could use my Tippy Tooltips add-on to hide the nids and cids.

image

This add-on allows you to create links in this format:

<a data-tippy-content="nidd1628755595321">

There’s a slight conflict that needs to be solved on your side though.
In view.py (of “Link cards…” add-on) in the function actually_transform, you need to change the quotes of the pycmd to ` instead of ", like this:

def actually_transform(txt):
    pattern = "(%s)(\\d{13})" % gc("prefix_cid", "cidd")
    repl = """<a href='javascript:pycmd(`%s\\2`);'>\\1\\2</a>""" % pycmd_card
    txt = re.sub(pattern, repl, txt)
    if gc("edit note externally"):
        pattern = "(%s)(\\d{13})" % gc("prefix_nid", "nidd")
        repl = """<a href='javascript:pycmd(`%s\\2`);'>\\1\\2</a>""" % pycmd_nid
        txt = re.sub(pattern, repl, txt)
    return txt

Then the links should work.

1 Like