GithubHelp home page GithubHelp logo

editor's Introduction

Editor

An editor inspired by acme.

screenshot

Design

  • Editor server (./editor/...)
    • go implementation with the executable editor(.exe)
    • serves the front-end
    • handles editor requests on complete window content
    • executes commands or handles built-ins
    • does not follow the state of windows or their layout
  • Front-end: (./editor/html/...)
    • mainly javascript served by the editor server on initial requests.
    • does the layout of windows
    • uses codemirror library for the actual editing
  • Editor commands (./cmd/...)
    • each editor command is an executable program and may be written in any language
    • is has to follow the protocol (./editor/cmd/cmd.go: Cmd) encoded in json.
    • new commands can be added or replaced, which does not require changes to the server or front-end
    • even read or write are their own commands

Compared to acme

  • runs on windows, uses the browser as frontend
  • supports images and html
  • their is no file system access to the editor state
  • current state and layout is only known to the front-end
  • lacks the top row, windows are added by pulling down the top window and columns are added by moving a window to the right by more than 50%

editor's People

Contributors

ktye avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

editor's Issues

implement findNext with right button

in static/editor.js:

 this.editor.on('mousedown', function(cm, evt) {
                if (evt.button == 2) {
                        var s = cm.getSelection()
                        var c = cm.getSearchCursor(s, cm.getCursor())
                        if (c.findNext()) {
                                cm.setSelection(c.pos.from, c.pos.to)
                                evt.preventDefault()
                                return
                        }
                        // Start from top.
                        c = cm.getSearchCursor(s)
                        if (c.findNext()) {
                                cm.setSelection(c.pos.from, c.pos.to)
                                evt.preventDefault()
                        }
                }
        })

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.