You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+9-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Obsidian Paste-As-Embed
2
2
3
-
When pasting text into a note, check the text against regexp patterns. When it matches, create a new note containing the text, and embed that note into the current note.
3
+
When pasting text into a note, check the text against regexp patterns. When it matches, create a new note containing the text, and embed that note into the active note.
4
4
5
5
## How to use
6
6
@@ -16,9 +16,9 @@ When text is pasted from the clipboard, it is checked against a list of user-def
16
16
When a rule is engaged:
17
17
18
18
- the pasted text is inserted into a template, if one is supplied for the rule;
19
-
- a new note is created, with its name and directory determined according to the settings defined for the rule;
19
+
- a new note is created, with its name and folder determined according to the settings defined for the rule;
20
20
- the contents of the new note are the (potentially templated) pasted text;
21
-
- the new note is embedded at the current position in the currently open note.
21
+
- the new note is embedded at the current position in the active note.
22
22
23
23
If no rule is engaged, pasting proceeds as it normally would.
24
24
@@ -48,11 +48,15 @@ Parts of this plugin are directly derived (see source comments) from parts of th
Additionally, I took inspiration from [obsidian-custom-attachment-location](https://github.com/RainCat1998/obsidian-custom-attachment-location) concerning the customization of note and directory naming.
51
+
Additionally, I took inspiration from [obsidian-custom-attachment-location](https://github.com/RainCat1998/obsidian-custom-attachment-location) concerning the customization of note and folder naming.
52
52
53
53
## TODO
54
54
55
55
-[ ] Allow individual rules to be toggled on and off
56
56
-[ ] Control precedence/order of rules
57
57
-[ ] Allow rules to be either 1) regexp-based, or 2) associated with hotkeys
filenameFmt: string;// How to name the embedded notes.
174
174
pattern: string;// Clipboard text pattern that triggers the rule
175
175
template?: string;// Insert the pasted text into this template, when writing to new file (e.g. code fence)
@@ -220,7 +220,7 @@ class PasteAsEmbedSettingTab extends PluginSettingTab {
220
220
if(modal.saved){
221
221
construle={
222
222
name: modal.name,
223
-
directory: modal.directory,
223
+
folder: modal.folder,
224
224
pattern: modal.pattern,
225
225
template: modal.template,
226
226
desc: modal.desc,
@@ -261,7 +261,7 @@ class PasteAsEmbedSettingTab extends PluginSettingTab {
261
261
if(modal.saved){
262
262
constmodalRule={
263
263
name: modal.name,
264
-
directory: modal.directory,
264
+
folder: modal.folder,
265
265
pattern: modal.pattern,
266
266
template: modal.template,
267
267
desc: modal.desc,
@@ -350,7 +350,7 @@ class ConfirmDeleteModal extends Modal {
350
350
351
351
classSettingsModalextendsModal{
352
352
name: string;// Identifies the rule
353
-
directory: string;// Where to create the new file
353
+
folder: string;// Where to create the new file
354
354
pattern: string;// Clipboard text pattern that triggers the rule
355
355
template?: string;// Insert the pasted text into this template, when writing to new file (e.g. code fence)
356
356
desc?: string;
@@ -363,7 +363,7 @@ class SettingsModal extends Modal {
363
363
364
364
if(rule){
365
365
this.name=rule.name;
366
-
this.directory=rule.directory;
366
+
this.folder=rule.folder;
367
367
this.pattern=rule.pattern;
368
368
this.template=rule.template;
369
369
this.desc=rule.desc;
@@ -415,13 +415,13 @@ class SettingsModal extends Modal {
415
415
);
416
416
417
417
newSetting(settingDiv)
418
-
.setName('Embedded note directory')
419
-
.setDesc('Where to save the embedded notes. Start with "./" for path relative to the directory of the current note. Use ${notename} for the name of the current note.')
418
+
.setName('Embedded note folder')
419
+
.setDesc('Where to save the embedded notes. Start with "./" for path relative to the folder of the current note. Use ${notename} for the name of the current note.')
0 commit comments