NotePlan
NotePlan
Dec 26

API Ideas & Wishes

As a developer I have ideas and would like to have the following api changes: 1. remove scheduling information (`>yyyy-MM-dd` or `<yyyy-MM-dd`) from the paragraph content and only have them in the rawContent, or create new variable `scheduledTo`/`scheduledFrom` 2. add possibility on the `TNote` to remove/clear all revisions (if I programatically clear a note, then maybe I also would like to remove all revisions) 3. add possibility to append / insert multiple paragraphs line by line which only creates ONE revision (currently we have to create a string with hardcoded markdown syntax and linebreaks) (as type I would suggest a `SimpleParagraph` with only `content:string` and `type:ParagraphType` - see my posts in the plugin-dev channel)
PendingPending

Jan 5, 2022

and for me currently the most important "bug" is, that we can't create future daily notes in code. would be nice to have such functionality in the `DataStore` just to add the files

Jan 5, 2022

also i would like to see an extended `removeParagraphs` function, where i can say (if there are `@repeat`s in this) if i want that the "remove repeats" popup appears, or it automatically removes the repeats, or it just ignores it (and don't remove the repeats). e.g. ``` removeParagraphs(paragraph: TParagraph, repeatsApproach: number) { if (number === -⁠1) { // dont remove future repeats } else if (number === 1) { // remove future repeats } else { // question popup } } ``` this would by useful for my `/sorter` where i sort task (remove, sort, insert) -> there i obviously don't want to remove future repeats, and it would be cool that there is no popup. at least at the `removeParagraphs` (plural) it would be nice to have such extension :)

Jan 4, 2022

also i would like to have a possibility to remove a note (via DataStore i guess)

Dec 27, 2021

also i would find it cool to have a `code` noteType for automatic inline code

Dec 26, 2021

Interesting suggestions. 1. Having `scheduledDate` property (or a pair of properties if needed) would be a very good way of making for cleaner and less fragile code when dealing with dates. Some of my plugins would get significantly shorter as a result. The addition of `>today` shows how it would be helpful to make this more structured. 2. Yeeeees, but I'd hesitate to use it. 3. Yes, good idea. (Note, Michael, that I think EM mostly treats Canny as a way to work out which are the most requested user features. I think you're better off sticking to the #plugin-dev channel, and getting support from the others there.)

Dec 27, 2021

Jonathan Clark: yes i know, but in the plugin-dev channel it will be lost in the other comments. and these are changes which are not for plugin-devs because EM has to change this in the noteplan api code

Dec 26, 2021

also i would suggest changes in the `DataStore`: `projectNoteBy.....` -> change to `projectNotesBy....` (plural) because the current names suggest, that there is only one note as return -> you always have to check manually the return type to handle it correctly in the code

Dec 26, 2021

Michael Wellner: Yep, good suggestion.