GithubHelp home page GithubHelp logo

codeshane / treed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaredly/treed

0.0 2.0 0.0 2.37 MB

Powerful Tree Editor

Home Page: http://jaredly.github.io/treed/

Makefile 0.67% JavaScript 91.09% CSS 6.88% HTML 1.35%

treed's Introduction

Treed

A Powerful Tree Editing Component

Join the chat at https://gitter.im/jaredly/treed

Treed wants to be for tree editing what ace is for text editing. Extensible, customizible, powerful, and just plain easy to use. Perhaps that's a little ambitious, but that's the idea.

Play with a demo

screenshot

Features

Keyboard navigation

I'm a vim user, so there are a lot of vim navigation commands that work out of the box, as well as more normal commands for everyone else.

Action Bindings
Navigationarrow keys, hjkl
Indent/Dedenttab, shift tab
Collapse/Expandalt + left/right
alt + h/l
z (toggle)
Undo/Redoctrl + z, ctrl + shift + z, u, R
Move Nodectrl + alt + arrow / hjkl
Edit modereturn, f2, a, A, i, I
Normal Modeescape
Toggle Donectrl + return
New Nodeo, O (before)
return (in insert mode)
Cut/Copy/Pastectrl + x / delete, ctrl + c, ctrl + v

There are several more as well.

Modularity

Treed is constructed using the MVC pattern such that it is simple to, for example, create an entirely different view for the tree.

You can also create your own "Node" class if you wanted to do more than just have a single text input. You could add buttons, more fields, whatever you want.

Undo/Redo

It works. Unlimited undo.

Drag and Drop

I'm still tinkering with the interaction on this. Should I let you drop as children of nodes that have no children?

Still under development

I made this version in a weekend, so there are still some things to do :)

  • multi-line select (cut/copy/paste multiple, not necessarily contiguous)
  • api docs
  • testing (js + browser)

Future Awesomeness

I want to implement a view layer similar to each of the following sevices:

  • workflowy
  • trello
  • a whiteboard
  • ginko
  • mindmap

And hook them all to the same model, allowing you to switch between contexts. And then hook it all up to a database (firebase or hood.ie or pouchdb or leveldb?). I think it will be exactly what I've always wanted; we'll see.

Build instructions

You will need:

npm install
cd demo
webpack --watch

Then open demo/plugins/index.html for example in your favorite browser, and enjoy!

treed's People

Contributors

jaredly avatar gitter-badger 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.