Pasting formatting with Power-Ups Rems

How can power-up rems be created with copy&pasting?

I can create a H1 with #Header. Does this create a valid structures, or is there a difference between the Ctrl + Alt + 1 shortcut and writing #Header?

H2 and H3 also just have the #Header tag. How does RemNote know that it should not be a H1? How do I create a H2 rem then (1) when pasting markdown (2) with the API.

Similarly manually tagging with #Highlight creates orange highlight for me.

Have power up rems the same id for all users? (I guess not since sharing would be harder.) Can I then reliably get_by_name the power up rem, since it is the oldest rem with that name?

Related: Resolution of pasted [[references]] and get_by_name

2 Likes

When a Rem is tagged with a Power-Up Rem, two things happen:

  1. The tag is added.
  2. Any slots for the Power-Up template are instantiated with default values. For example, “Highlight” has a slot of “Color” that defaults to “Orange”.

Adding a Power-Up Rem via a tag should work the same as adding it via the UI.

Unfortunately, this does mean that there is not currently a way to add non-default slot values via the API. In the future, we’ll support this by recognizing slots that are manually entered (or entered via the API). Additionally, we’ll likely be adding more API endpoints for working with power-up rem in the future as well.

1 Like

I think there must be an additional catch. If I add a #Document tag by typing it it behaves different from using the shortcut (or UI button): The bullet does not change and still opens this rem in a portal like here: https://github.com/remnoteio/remnote-issues/issues/196

Is that what you mean with 2.? (There is a slot in #Document which is empty and therefore it is not true document.) Or is it a bug that in this case a default value does not work correctly?