Leave it as is, but if/when you are able to get to "open new note automatically" have the cursor in the title box, then it is fast to leave or edit. The biggest issue with this is that the link to the note would have different text.
Have a popup box, as you said. Ideally, this would be pre-populated with the selected text, so I could quickly hit enter if I am ok with it.
Same as #2, but with a setting that says "choose custom title if text is above words". This would give the user some control. This lets me have the functionality to really quickly create "wiki" style links (where I highlight a word or two, click a keyboard command, and a new entry with that name is created). But it also works in the case when I am actually trying to move part of a long note into a separate note. In that case, I'd almost always want to have a different title.
All of a sudden, Convert Text To New Note doesn't work anymore.
I didn't use it since maybe 2 weeks, today I wanted to split a few notes and nothing happens when I select some text => right-click => Convert Text to notes (same things from the icon).
Looking at the console log, this is what I have : -1610265787472.log (1.2 KB)
Log
index.html:1 Uncaught (in promise) Error: Cannot execute a command without a runtime: selectedText
at CommandService.<anonymous> (C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\CommandService.js:144)
at Generator.next (<anonymous>)
at C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\CommandService.js:8
at new Promise (<anonymous>)
at __awaiter (C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\CommandService.js:4)
at CommandService.execute (C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\CommandService.js:136)
at JoplinCommands.<anonymous> (C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinCommands.js:56)
at Generator.next (<anonymous>)
at C:\Users\admin\AppData\Local\Temp\1mpmxbqw6gSvGilmcLUZ6c7NPdS\resources\app.asar\node_modules\@joplin\lib\services\plugins\api\JoplinCommands.js:8
at new Promise (<anonymous>)
If i understand it correctly, it would work like this:
If text is just one line - (few words), create new note with those words as title.
If text is 2 or more lines, ask for title in popup (pre-populated with first line to be edited or accepted).
It looks like the trigger for asking for the title is >1 paragraph. This threw me off when I tried on a paragraph with many lines of text. Maybe a future change could trigger it based on having lots of words? Not sure if that's possible.
I'm finding this plugin very useful in conjunction with my daily "todo note" that I work out of as my anchor or reference point for the day. Anytime an item starts getting a little long, this plugin streamlines the process of creating a new note out of that text and creating the backlink. This keeps my daily todo note neat and easy to scan.
Agreed. Anytime you have more than a few words that you are going to convert to a note, you'll likely want to change the note title since most of us don't use sentence-long note titles.
Good points.
I will make it trigger on amount of words in first line (8? 10?).
Technically its not dependent on paragraph but on new line made with Return (or Enter) key.
So if one will write long text without breaking it with Enter its treated as one line,while it looks in editor as having multiple lines.
IMHO, even 8-10 words is too high a threshold. Check the titles of your 10 most recently updated notes - what's the average # of words in note title? I'm guessing it's less than 8. Just ran this test on my notes - avg for 10 most recently updated notes is 4 words (and I counted words like "and", "for", and still only 4 word avg for titles).
Is is possible to create exclusive options in a plugin's settings (meaning user can only specify one option)?
If so, maybe something like:
Always ask for title
Ask for title if 8 or more words are selected
OR how about this instead, if technically feasible:
Ask for title if more than [ ] words are selected
User supplies # of words to trigger title pop-up. 0 = always ask.
Just tried new version. Looks good, but I noticed one issue, when I select text and run plugin, the newly created note duplicates the selected text. So for example, I selected "test converter" in a note, ran plugin and new note body shows:
Did you use 0 or so as number of words to trigger popup?
If so the dialog popup asks for a title and adds it to the beginning of new note.
The highlighted text becomes new title (first line in editor) and ,additionally, a new body (everything below).
Yes, 0 words in settings (behavior described below is identical for 0 or 1 word).
Part of the design makes sense to me - user edits title, and this becomes title of new note and the text for the link placed in the referring note. But this edited title also becomes the first line of the note body, followed by the originally selected text - this bolded bit seems undesirable.
For example, I select the words "test converter" in a note, then edit title to "plugin check". Results:
If I give a note title, it should be the title of the new note and the text for the link, but why should it also be the first line of the new note's body?
It is created to follow Joplin default behavior when creating new notes (if you create new note - first line of "body" is used as title)
Basically all my notes look also like this:
But it doesn't have to be this way.
There can be option to not insert title into first line of body if popup is used and still preserve title in note as whole.
Yes, but that's only if you start a new note without a title. Since every note must be titled, Joplin uses the first line as title. So the original text is in note body and the duplication is in the title. Evernote does this as well; probably most other note apps as well.
BUT, if you enter a title first, then you start typing in note body, there is no duplication of that title text - as there is no need for it, because user has specified title, so no need for app to assume a title. I would think this situation is more analogous to what your plugin is doing when user triggers title popup - i.e., user is specifying a title, so no need for duplication of title text.
An option would be fine, but I think unnecessary. If you follow my logic above (hopefully I was clear), the only reason there is duplication in Joplin (or Evernote, etc.) is because user does not specify note title, so app must assume one. That duplication is a one-way street - it's only duplicating note body text into an empty title field. It's not duplication of title into note body, which is what your plugin does now, which is undesireable, at least in my humble opinion.
What you say , JB , make sense.
I would make it an option though.
Reason is that using it the old way is consistent
with other ways of creating notes.
(At least, i don't know whats most common
way of creating note's title)
So i wouldn't push it as default way.
Give me a bit of time and i will add it.