Code Monkey home page Code Monkey logo

joplinpluginnotevariables's Introduction

Note Variables Plugin

With this plugin you can create string variables that can be used across all your notes.

Usage

To begin you need to create a new Variables Note, you can do that by clicking on Note > "Create variables note":

Inside the Variables Note you can add as many string variables as you need inside the created table:

To use the variables in a note you have to write an inline code like import Variables1 AnotherVariables. The rendered text will turn green if the import was succesful, and red if the plugin could not find the Variables Note:

Usage notes

  • Every Variables Note must have a different name and without spaces. If two Variable Notes have the same name the plugin will use the first one it finds.
  • Every variable in a Variable Note must have a different name, otherwise just the first of the same name will be used.
  • You can import multiple Note Variables in a single note, but if they have variables with the same name the variables from the rightmost import will take priority.
  • Sometimes after starting Joplin, you have to switch notes to see the variables replaced on the note.

Download

You can install it directly from Options > Plugins > Search for "Note Variables".

Bugs, feature requests or contributions

Please report any bugs you find, or any feature request you have on the GitHub Issues page Feel free to contribute to the plugin making a pull request to the Dev branch.

joplinpluginnotevariables's People

Contributors

dantecoder avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

joplinpluginnotevariables's Issues

What I miss

Hi this is a very interesting plug-in, with lots of potential. If I may make the following suggestions - I would be very grateful.

  1. The area where one adds variables ... scrolls down as one adds variables and then becomes unseen when there are too many. Could it not rather be at the top and variables are add below it ?
  2. Could the variables list have a scroll bar so one can go down the list and change values with out going into the %NoteVariables% file ? (the %NoteVariables% file is too confusing for a non programmer like me)
  3. This may be asking too much, but this plug in is very useful for different types of notes / documents, so if at the beginning of a note or document one could refer to a specific: %NoteVariables - XXX%, then different files could have %NoteVariables% ... this would save time.

Thank you very much for your attention and time -much appreciated.
Sergio

Conflict with the Outline plugin

Installing your plugin destroys the functionality of the Outline plugin. The Outline plugin loses its functionality to toggle the visibility of the panel: The outline button (hamburger icon) disappears, and the shortcut F9 does not work anymore.

Feature request: JSON syntax highlighting

Hello. Thanks for your work. As a small tweak could you please add opportunity to store variables with JSON syntax highlighting. Because current output (right side) doesn't comfort for eyes

Current:
image

Desired:
image

Code blocks not rendering variables

I realize this is probably by design, but I actually have a use case where it would be useful to render variables within code blocks. Can you provide a way to override a code block so that it actually renders the variable in the markdown preview?

Perhaps overriding it by using some sort of syntax language value , like note_vars or something could be a solution?

Example:

variable value
var_name erik

Code view:

```note_vars
var_name
```

Rendered as:

erik

Infinite "Updated remote items: 1"

Hello, this is a great plugin and I hope we can get more development on it.

Here is how I have been able to reproduce this bug:

  1. It seems that after I install the plugin and use it, I hit "Synchronize".
  2. Joplin tells me it is updating. I hit it again after it completes.
  3. It tells me it is updating.
  4. You can repeat step 2.

Current "fix" is to uninstall the plugin. Joplin behaves as expected when this plugin is not installed.

Expected behavior: seeing a "Completed: " after the sync process.

Renaming Variable Pages

Thank you for your continued work on this plugin! Do you plan to expand this project? As in, changelog, contributor's guide, and more?

Anyway, this is a feature request. It would be nice if I could rename the variable pages. All of my titles are neatly written, so having symbols seems weird.

I think this is doable because I renamed %Variables1% to testing. Then I imported it and it seems to work. I'm not sure without further testing.

Of course, if you know this is safe, you can close.

Rendering ToC

Scenario: you're writing the world's shortest book.

You have a few headings and a ToC to go with it.

${toc}

## Chapter 1

## Chapter 2

## Chapter 3

But say you decide you want to use variables for the chapters just because.

`import example`

${toc}

## $chapter1

## $chapter2

## $chapter3

The ToC doesn't render the headings. It would be nice if it did. I'm not sure if it's the markdown limitation (for the same reason why underline is not supported) or something that can be done.

On a small side note, is it safe to add comments to the variable pages? Like so:

|  variable  |   value   | comment |
| ---------- | --------- | --------- |
|  $chapter1  | Chapter 1  | Start of the book |

Or even this in the next few lines?

variables to resources

Was hoping this plugin would define me variables to resources, but it will render the link-reference instead displaying link itself.

For example -- I have some images in this case SVG of the flag of Monaco (it came from webclipping a website) and made it a resource in my Joplin dBase:
![Monaco](https://cdn-1.motorsport.com/static/img/cf/mc-2.svg) => ![Monaco.svg](:/aed8a6dec36e44c184e53dde8a1febca)

Then I put it in the variable table

| variable | value |
| -------- | ----- |
| !monaco | ![Monaco.svg](:/aed8a6dec36e44c184e53dde8a1febca) |

Hoping to use !monaco everywhere in Joplin to get the flag,

Monaco

but it will just give me ![Monaco.svg](:/aed8a6dec36e44c184e53dde8a1febca) in the text

Is there anyway I could use this variables-plugin in my use-case?

Hiding the Code Line

Wow... v2.0.0 is fantastic ... well done!

There may already be a way that I don't know about, but if not ... It would be great to be able to hide the inline code so printing or pdf output ... could or could not, (user's choice), show the code line.

Is that possible ?

Best Regards
Sergio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.