Look at what I made... I made.. a Kate snippet... but not just any Kate snippet... it's a Kate snippet that can make a href links to selected text using clipboard content....
-
Look at what I made... I made.. a Kate snippet... but not just any Kate snippet... it's a Kate snippet that can make a href links to selected text using clipboard content.... It took me 24 hours of work because there are literally zero tutorials nor documentation on this in Japanese... I have also made this accessible with a keyboard shortcut... so that I can make href links at will.... without typing
<a href="clipboardtext.html">selectedtext</a>every single time....
Snippet:${hrefwrap()}
Script Library:function hrefwrap() {return "<a href=\"" + editor.clipboardText() + "\">" + view.selectedText() + "</a>";}
#Kate #KDE #Snippet -
Look at what I made... I made.. a Kate snippet... but not just any Kate snippet... it's a Kate snippet that can make a href links to selected text using clipboard content.... It took me 24 hours of work because there are literally zero tutorials nor documentation on this in Japanese... I have also made this accessible with a keyboard shortcut... so that I can make href links at will.... without typing
<a href="clipboardtext.html">selectedtext</a>every single time....
Snippet:${hrefwrap()}
Script Library:function hrefwrap() {return "<a href=\"" + editor.clipboardText() + "\">" + view.selectedText() + "</a>";}
#Kate #KDE #Snippet@rio@kawane.misskey.online
JS supports this funny interpolation syntax. As a bonus, you don't need to escape double quotation marks.function hrefwrap() { return `<a href="${editor.clipboardText()}">${view.selectedText()}</a>` } -
R relay@relay.mycrowd.ca shared this topic