macnotesapp icon indicating copy to clipboard operation
macnotesapp copied to clipboard

Back to Line

Open hamzaNb98 opened this issue 1 year ago • 1 comments

who can I add multiple lines, Like this :

new_note = notesapp.make_note(
    name="New Note",
    body="This is a new note created with #macnotesapp \n This is a second Line"
)

hamzaNb98 avatar Oct 06 '23 13:10 hamzaNb98

The body is html so you need to use '
'

Here's what the notes add command does:

body = "".join(f"<div>{line or '<br>'}</div>\n" for line in body.split("\n"))

I'll add a note to the docs. Might be good to a format= argument to allow use of plain text, HTML, or Markdown

RhetTbull avatar Oct 06 '23 15:10 RhetTbull