npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

joplin-plugin-markdown-calc

v1.0.5

Published

Plugin for automatic calculations of markdown table formulas.

Downloads

3,615

Readme

Joplin Markdown table calculations plugin

Joplin editor plugin for making calculations in markdown tables. Inspired by an Emacs Org mode feature which allows to make TBLFM comments under the table and perform calculations.

References/thanks

Big thanks to authors of two projects which are the calculation engine core:

  • Markdown-it with the wonderful Markdown parser, I've used it to locate and extract table data in a Markdown document.
  • Hot formula parser - incredible useful library for evauating mathematical formulas.

Features

  • Define table formulas in Markdown files
  • Recalculate all formulas in a file using custom command

Usage: formula list

To define a set of table formulas, you can add a special HTML comment below a given Markdown table (TBLFM is a tribute to an Emacs Org mode :) . Only the first comment directly under the table will be taken into account. You can use TBLFM or TABLE_FORMULAS strings to indicate formula list.

| Column A | Column B | Column C |
|:---------|:---------|:---------|
| 123      | 456      | 789      |
| 0        | 0        | 0        |
<!--TBLFM C2=A1+A2; C1=56*78/4 -->

The comment can span multiple lines and contain multiple formulas separated by a semicolon. Formulas are calculated in the following order: first row then all its columns fron the left to the right, second row ... etc. Table cells are described using spreadsheet notation, columns designated with letters like A,B,C .. Z (and even more AA, AB etc.) and rows with integers 1,2,3 ... You can also use range notation like A1:E23. Moreover, hot-formula-parser contains also a big set of predefined functions which can be used in formulas. For list of the formula functions and their use, please look at: https://formulajs.info/functions/ (however, I didn't check all of them).

Usage: inline cell formulas

There is also a possibility to define formulas directly inside the cell. To do so, you need to insert a special comment inside the cell content with FM or FORMULA indicator.

| Column A | Column B |    Column C     |
|:---------|:---------|:----------------|
| 123      | 456      | 789             |
| 0        | 0        | <!--FM A1+C1 -->|

WARNING! If you use both cases in the same table, inline cell formulas are overwritten by the formulas put into the list below the table!

Plugin command

The plugin registers markdownCalculate command and adds it to the editor toolbar (the fa-square-root-alt icon).

Important Notes

  1. WYSIWYG editor removes HTML comments, so you will loose formula definitions.
  2. Table values are updated using internal editor.setText command, so you will be unable to undo changes.
  3. Cell values are converted to float numbers. If conversion fail, the cell value will be returned as a string. However, you need to remember that strings like 7/18/2011 7:45:00 AM will be properly parsed as float 7. To use them as strings, they have to be written in double quote "7/18/2011 7:45:00 AM".

Building the plugin

To build the plugin, simply run npm run dist.