diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html index 851f267f7..d3f5a7570 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html @@ -1,15 +1,15 @@

When you run Trilium for the first time, it will generate a new database containing demo notes. These notes showcase its many features, such as:

Restoring Demo Notes

@@ -21,10 +21,10 @@

You can easily restore the demo notes by using Trilium's built-in import feature by importing them:

\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html index c65b789d0..f0f720b87 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html @@ -7,13 +7,10 @@ via an attribute.

Creating a render note

    -
  1. Create a Code note - with the HTML language, with what needs to be displayed (for example - <p>Hello world.</p>).
  2. -
  3. Create a Render Note.
  4. -
  5. Assign the renderNote relation to +
  6. Create a Code note + with the HTML language, with what needs to be displayed (for example <p>Hello world.</p>).
  7. +
  8. Create a Render Note.
  9. +
  10. Assign the renderNote relation to point at the previously created code note.

Legacy scripting using jQuery

@@ -29,7 +26,7 @@ The current date & time is <span class="date"></span>
const $dateEl = api.$container.find(".date");
 $dateEl.text(new Date());
-

Now create a render note at any place and set its ~renderNote relation +

Now create a render note at any place and set its ~renderNote relation to point to the HTML note. When the render note is accessed it will display:

Current date & time @@ -42,33 +39,37 @@ $dateEl.text(new Date()); need to provide a HTML anymore.

Here are the steps to creating a simple render note:

    -
  1. Create a note of type Render Note.
  2. -
  3. -

    Create a child Code note +

  4. +

    Create a note of type Render Note.

    +
  5. +
  6. +

    Create a child Code note with JSX as the language. -
    As an example, use the following content:

    export default function() {
    +      
    As an example, use the following content:

    export default function() {
         return (
             <>
                 <p>Hello world.</p>
             </>
         );
     }
    -
  7. -
  8. In the parent render note, define a ~renderNote relation - pointing to the newly created child.
  9. -
  10. Refresh the render note and it should display a “Hello world” message.
  11. + +
  12. +

    In the parent render note, define a ~renderNote relation pointing + to the newly created child.

    +
  13. +
  14. +

    Refresh the render note and it should display a “Hello world” message.

    +

Refreshing the note

It's possible to refresh the note via:

Examples

\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html index 2abeaa288..f9d7fab75 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html @@ -1,22 +1,22 @@ -

For both Render Note and +

For both Render Note and more complicated scripts, it's generally useful to split the code into - multiple Code notes.

+ multiple Code notes.

When a script is run, the sub-children of the script being run (or the  Render Note) are checked for children. If the children are Code notes + class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note) are checked for children. If the children are Code notes of the corresponding type (front-end or backend) as the code being run, they will be evaluated as well.

The collection of a script and its child notes is called a bundle. A child note inside a bundle is called a module.

As a basic example of dependencies, consider the following note structure: