Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%*
- // This is the general idea, abstracted from a more involved template.
- // It assumes the URL of your bookmark is currently in the clipboard.
- // edit - adjusted this so this template also creates the file
- await tp.file.create_new("", "path/to/your/bookmarks/untitled_bookmark", true);
- var userClipboard = await tp.system.clipboard();
- var titleHere = await tp.system.prompt("What should this file be named?");
- var renameMe = true;
- if (titleHere == "") {
- titleHere = tp.file.title;
- renameMe = false;
- }
- var introHere = await tp.system.prompt("Provide a brief description of this file.");
- tR += "---\n";
- tR += "title: " + titleHere + "\n";
- tR += "tags: bookmark\n";
- tR += "cssclass: \n";
- tR += "---\n\n";
- tR += "# " + titleHere + "\n";
- tR += "(intro:: " + introHere + ")\n\n";
- tR += "## Outlinks\n";
- tR += "* [url:: " + userClipboard + "]\n";
- tR += "* [goto:: [" + titleHere + "](" + userClipboard + ")]\n\n";
- tR += "---\n# Main Note\n\n";
- tR += "<iframe src=\"" + userClipboard + "\" width=\"100%\" height=\"600px\"></iframe>\n\n";
- tR += "---\n# Questions & Ideas\n * \n\n---\n# Change Log\n *\n\n---\n#Footnotes";
- if (renameMe == true){ await tp.file.rename(titleHere); }
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement