Giter Club home page Giter Club logo

md-advanced-tables's Introduction

Markdown Advanced Tables

This library can be used by any text editor to enable formatting, Excel-style navigation, and spreadsheet formulas to Markdown tables.

It was originally created by @susisu. This fork converts the project to Typescript and adds additional functionality such as table sorting, and spreadsheet capabilities.

demo

Spreadsheets and Formulas

To learn more about the spreadsheet and formula capabilities, check out the Formulas in Markdown Tables page.

Implementations

This is a list of known implementations of this library:

Installation

npm i @tgrosinger/md-advanced-tables

Usage

Implement an interface to the text editor.

interface ITextEditor {
  getCursorPosition(): Point;
  setCursorPosition(pos: Point): void;
  setSelectionRange(range: Range): void;
  getLastRow(): number;
  acceptsTableEdit(row: number): boolean;
  getLine(row: number): string;
  insertLine(row: number, line: string): void;
  deleteLine(row: number): void;
  replaceLines(startRow: number, endRow: number, lines: Array<string>): void;
  transact(func: Function): void;
}

And then you can execute commands through a TableEditor object.

import { TableEditor, options } from "@susisu/mte-kernel";
const textEditor = ...; // interface to the text editor
const tableEditor = new TableEditor(textEditor);
tableEditor.formatAll(options({}));

Look at advanced-tables-obsidian as a reference implementation for more information.

Pricing

This plugin library is provided to everyone for free, however if you would like to say thanks or help support continued development, feel free to send a little my way through one of the following methods:

GitHub Sponsors Paypal BuyMeACoffee

License

MIT License

Author

Current author: Tony Grosinger (Github)

Original author: Susisu (GitHub, Twitter)

md-advanced-tables's People

Contributors

susisu avatar tgrosinger avatar jadbox avatar mpic avatar

Watchers

James Cloos avatar  avatar

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.