If you are using await in your code, wrap it in a try-catch block to get the error messages. Open a new window or sheet with the HTMLView that loads up the given HTML code which can interact with NotePlan's data.Īccess and set the data inside the current clipboard. The CalendarItem is used in combination with Calendar to create events or reminders. ![]() Ranges are used when you deal with selections or need to know where a paragraph is in the complete text. NoteObject and Editor both inherit the same paragraph functions. See more paragraph editing examples under Editor. You can change the complete text of the note, which will be saved to file or query, add, remove, or modify particular paragraphs (a paragraph is a task for example). A task for example is a paragraph, a list item (bullet), heading, etc. They represent blocks or lines of text (and are delimited by linebreaks = \n). You can get paragraphs from Editor or NoteObject. See also CalendarItem if you want to create an event or reminder. Use Calendar to create events, reminders, and to parse dates, like "tomorrow at 8am to 10am", "today", or "1st May". So, it's fine to show a long list of options, like all folders or notes or tasks in a note. This list can be "fuzzy-search" filtered by the user. Either by asking the user to type in a free-form string, like a note title, or by giving him a list of choices. It allows you to query a set of user preferences, too. With DataStore you can query, create and move notes which are cached by NotePlan. Here are the available functions you can call with the Editor object: Prefer working with the paragraph objects instead to modify text directly. This can make calculating character positions and changing the text a bit tricky. However, be careful about character positions, because NotePlan hides Markdown characters and replaces whole parts of text such as the URL in Markdown links or folded text with a single symbol. You can access the text directly from here, change the selection and even highlight parts. ![]() This refers to the markdown editor and the currently opened note. PluginCommandObject // Represents a command of a plugin (documented in DataStore)Īccess environment information like region code, language code, timezone. PluginObject // Represents an available or installed plugin (documented in DataStore) RangeObject // Range of text like a selection ParagraphObject // Line of text, like a task, bullet. Helper objects (usually as return values) HTMLView // Open a window or sheet with html code that can interact with NotePlan NotePlan // Global environment information and other functionsĭataStore // Query, read and modify notesĬlipboard // Access and set the clipboard ![]() Here is a list of available global objects: NotePlan provides various global Javascript objects to give you access to your data and to prompt user input.
0 Comments
Leave a Reply. |