-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first line should be style "title" (& markdown is ignored) #13
Comments
Thanks -- I'll take a look. It's not possible to stylize the title via the Notes AppleScript interface so this is tricky to implement. |
I've been able to replicate this and did some testing via adding notes a number of different ways. If the name (title) of the note is blank, Notes sets the title to "Notes" which isn't helpful. Unfortunately, as annoying as this is, it may be something I can't fix as long as I'm stuck using the AppleScript interface to add notes. If I could find a private API that Apple uses and call that, I might be able to set the style for the title but at the moment, anything I try results in formatting being stripped from the title when added via AppleScript. The first entry is the one created by Notes.app directly. The others were all created by macnotesapp. [
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1483",
"name": "This is a brand new note",
"body": "<div><h1>This is a brand new note</h1></div>\n<div><br></div>\n<div>This is body text.</div>\n",
"creation_date": "2022-11-06T20:27:06",
"modification_date": "2022-11-06T20:27:15",
"password_protected": false,
"folder": "Notes"
},
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1486",
"name": "This is a brand new note added via `notes add -e -m`",
"body": "<div><font face=\"Helvetica\">This is a brand new note added via `notes add -e -m`</font></div>\n<div><b><span style=\"font-size:
24px\">This is markdown header 1</span></b></div>\n<div>This is some text</div>\n<div><b><span style=\"font-size: 18px\">This is a markdown header
2</span></b></div>\n<div>This is more text</div>\n",
"creation_date": "2022-11-06T20:32:13",
"modification_date": "2022-11-06T20:32:13",
"password_protected": false,
"folder": "Notes"
},
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1487",
"name": "This is a brand new note added via `notes add -e --html`",
"body": "<div><font face=\"Helvetica\">This is a brand new note added via `notes add -e --html`</font></div>\n<div><b><span style=\"font-size:
24px\">This is a heading</span></b></div>\n<div>This is a paragraph</div>\n<div>This is another paragraph</div>\n<div>This is a <b>bold</b>
paragraph</div>\n",
"creation_date": "2022-11-06T20:33:06",
"modification_date": "2022-11-06T20:33:06",
"password_protected": false,
"folder": "Notes"
},
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1492",
"name": "This is a brand new note added via `notes add -e --html` using same\u2026",
"body": "<div><font face=\"Helvetica\">This is a brand new note added via `notes add -e --html` using same markup as
Notes.app</font></div>\n<div><b><span style=\"font-size: 24px\">This is a brand new note added via `notes add -e --html` using same markup as
Notes.app</span></b></div>\n<div>\\n</div>\n<div><br></div>\n<div>\\n</div>\n<div>This is body text.</div>\n<div>\\n",</div>\n",
"creation_date": "2022-11-06T20:44:57",
"modification_date": "2022-11-06T20:44:57",
"password_protected": false,
"folder": "Notes"
},
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1488",
"name": "<h1>This is a brand new note added via `notes add -e --html` but with\u2026",
"body": "<div><font face=\"Helvetica\"><h1>This is a brand new note added via `notes add -e --html` but with header tags in the first
line</h1></font></div>\n<div>This is some text</div>\n",
"creation_date": "2022-11-06T20:34:15",
"modification_date": "2022-11-06T20:34:15",
"password_protected": false,
"folder": "Notes"
},
{
"account": "iCloud",
"id": "x-coredata://BA47E88C-3599-48BE-88DD-5CBC118E9CE6/ICNote/p1485",
"name": "This is a brand new note added via `notes add -e`",
"body": "<div><font face=\"Helvetica\">This is a brand new note added via `notes add -e`</font></div>\n<div><br></div>\n<div>This is body
text</div>\n",
"creation_date": "2022-11-06T20:31:14",
"modification_date": "2022-11-06T20:31:14",
"password_protected": false,
"folder": "Notes"
}
] |
I'd say submit this to https://feedbackassistant.apple.com/ but I have bugs of this caliber on there that are 8 years old that have never been looked at. I don't think anyone at Apple even knows it exists. |
I'm in the midst of a complete rewrite of this project to use ScriptingBridge (#16) and I've figured out how to apply style to the title of the note. I've not quite figured out how to replicate the default style Notes.app but think I can eventually do this. The new rewrite will be much faster and will enable a fully-interactive UI in the Terminal. |
If I add a note using
notes -e
:If I add a note using
notes -e -m
:# this is the first line
the#
shows up in NotesThe text was updated successfully, but these errors were encountered: