Giter VIP home page Giter VIP logo

text-editor's Introduction

Tools: Text Editor

This is a simple text editor in a web browser; part of the ongoing Creative Coding series of experiments. The main aim is to study all the simple interactions that we take for granted with modern editors and IDE and see how to implement these features. One of my motivation is to explore alternative to Codepen for my teaching session at Alba this coming February and build a tool for me to share live code examples with the students. The development of such a tool lies at the cross roads of different projects involving realtime video mix on a canvas, reactive and genrative svg editor and various image generators.

Things to ponder: how things work in general

  • when the cursor moves,
  • when a key is pressed like '"<([{ and it auto-closes the symbol
  • when html, js, css, svg (etc) tags are auto-completed
  • when usign syntax highlighting
  • to have multiple selection are copied and/or pasted
  • when decoupling selection and cursor position (like in a unix terminal)

Things to work on next

  • make it possible to write the code of this text editor within itself, asap
    • multi-lines text paste
    • [-] cursor moves left, right, up, bottom
      • control columns when goign up/down
        • is it possible for the selection to be decoupled from focus and typing cursor
        • click for selection: presently this will change the column
    • multi-lines text copy
      • issue might be similar to difficult selection issue on Notion.so
    • multi-lines file import
    • multi files opened; tabs?
    • save and open files
    • keep the file when the page is reloaded; webstorage api
    • use an automated workflow; webpack/grunt/gulp to watch the files; use browsersync
  • Document
    • the use of Valet
    • the use of the console; plan/think the real need for an internal console
  • Editor
    • Delete a line
    • Select across multiple lines
      • shortcuts, point-and-click
      • examples: Nano/Vim, Notion.so, Sublime Text, Acme (Plan9), Ed, Sam (text-command-language vs mouse-command-language)
  • real time preview
    • how to assemble the content of the
    • into a single text and interpret it
      • js: can use eval()
      • how to design the ability to change the language: svg, css, html, js etc.
  • text selection, shortcuts and meta actions (
    • move this line up,
    • convert upper/lowercase,
    • prettify JSON,
    • fold/unfold section,
    • indentation
    • multiple panes(i3)/tabs/files
    • Languages
      • Markdown
      • SVG
      • Javascript
      • Three.js
    • continue: establishing a list

Some features to be considered:

Some background thoughts

Notes

  • Shortcurts with combo keys: The event object has a metaKey property that can be tested along the keycode liek so: ```case event.which = 86 && event.metaKey == true:``

"Build your own tools.", Daniel Nordh.

text-editor's People

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.