Code Monkey home page Code Monkey logo

litewrite's Introduction

Unobtrusive Writing by Jan-Christoph Borchardt & Jorin Vogel

Warning: Unmaintained/In search for new maintainer

Litewrite hasn't been maintained for a couple of years now so if anyone still interested in using it and likes to step up and take over maintaining/improving/rewriting it, please reach out in the GitHub issues


Litewrite was built out of a need to have a simple way of taking notes, having them everywhere, working on any device, regardless if on- or offline.

  • simple design
  • available everywhere (device compatibility + synced data)
  • works offline

No current solution provides that. It's quite strange that something as benign as jotting down text isn't really solved unless you buy into one specific »ecosystem«. Either the design is complicated, or they only work on Apple hardware, or they are tied to Dropbox, or you can't do anything if you don't have wifi, or or or …

So we built Litewrite.

  • Simple design: There are lots of other self-titled distraction-free editors which offer music, themes, different typefaces, etc etc. We don't, because we think that's unnecessary. If you want music you can listen to it using your favorite music player, if you want to change the font size you can zoom using your browser, …
  • Device compatibility: It’s a web app which works on all devices and operating systems.
  • Synced data: Notes are available everywhere, using the open remoteStorage standard, Dropbox or Google Drive.
  • Offline: Once loaded, it’s essentially a desktop app. Thanks to AppCache and localStorage, both app and data are fully cached offline and synced whenever online.

Now of course it's far from perfect, but we and lots of others use it day-to-day. And that's also why we made it open source. If you experience any problems or have suggestions, please let us know at http://github.com/litewrite/litewrite/issues. And if you know a little about web development, you're welcome to dive into the code at http://github.com/litewrite/litewrite.

Cheers, Jorin & Jan-Christoph

Contribute

Build Status

Play with the development version, check out issues and dive into the code if you like.

Set up your development environment:

  1. git clone https://github.com/litewrite/litewrite.git
  2. cd litewrite
  3. Install node.js
  4. Run npm install to install the development dependencies
  5. npm start to start a web server at http://localhost:8000
  6. Check your code style with npm run lint
  7. Build the production version with npm run build

Thanks

Inspired by iA Writer & LightWrite. Initial prototype built on Notes. Alegreya typeface by Juan Pablo del Peral.

Remotestorage

This is an unhosted web app, meaning its code is fully client-side, without any server backend you need to trust! It also supports the open remotestorage protocol so you can sync your data across devices & browsers.

License

Copyright (c) 2012 Jan-Christoph Borchardt & Jorin Vogel, licensed under the Affero General Public License version 3 or later. See license.txt for the full license text. Short: Do anything you want as long as you credit us and redistribute your changes under the same conditions.

litewrite's People

Contributors

3demax avatar brianpeiris avatar galfert avatar jancborchardt avatar jorinvo avatar maxlath avatar michielbdejong avatar nilclass avatar nv avatar raucao avatar vovkkk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

litewrite's Issues

empty documents remain in storage

When I remove all content from a document it should be deleted. Right now it gets saved with empty strings as "content" and "title".

current line / cursor position should be vertically centered

Instead of the cursor moving around, the document should move around. It’s just an idea – I think iA Writer does it like that.

Where it should definitely happen is at the bottom and top: Currently if you just write, you will hit the bottom of the screen which is very ugly. Instead there shoul always be some padding to the bottom – but the scrollbar shoul reach the bottom, which is why I think this is not possible with CSS.

firefox shows resize controls by default

Observed behaviour:
As soon as I focus the #editor, little boxes appear around it's corners, that allow me to resize it. Doing so breaks the layout and causes the editor to overlap the document list irrecoverably.

Expected behaviour:
The editor already takes up as much space as it can, so I expect that browser feature to be disabled

Affected browsers:
reproducable with Iceweasel 8.0-3+b1 on Debian
not reproducable with Firefox 15.0.1, also on Debian

Possible solution:
Calling document.execCommand('enableObjectResizing', false, false); as soon as the document has loaded seems to solve the problem.

performance audit

Once we deploy the app on 5apps (with all the gzip & file minify optimization) we should run some performance tests to check what we need to optimize further. For instance with the Webkit developer tools (Network, Timeline, Profiles, Audits).

tab character behavior

At the moment, pressing tab (for example to indent a line) makes the editor lose focus and forces people to click into the text again to continue typing.

Instead, pressing tab should insert a tab space just like any normal editor does.

license change from MIT to AGPL?

Currently we use the MIT license because I just added it initially. Because it’s an application rather than a library I would actually prefer we license it under AGPL so that when others make changes they have to redistribute them also.

What do you think @jorin-vogel?

fade when switching documents

When clicking a different document, currently the content just switches quickly. This is a bit confusing as your eyes are focused on the document list at the time it happens.

Instead, the documents should have a short fade out and the new one a short fade in (200 ms maybe).

Enhanced Editor

It would be awesome if the editor would support auto-formatting for some symbols.
Ideas:

  • links should be formatted as links
  • the editor could support some markdown functionality

show date

The date of a document is very important (see #24), especially as soon as it is possible to publicly share & publish (#19).

We should include that somehow. For thoughts on how to display the age in the document list, check out #24.

The date of the document should be shown in a format like »a week ago« (switching to »2 August 2012« on hover – omitting the exact daytime). Permanently on the top right of the document, unobtrusive and in cursive. moment.js will be useful for that.
For an unpublished document, this time should always update when the document is edited (or when it is left as last open). For a published document, the time should freeze as soon as it is published, even with changes afterward. (As we don’t have publishing yet though, that’s nothing to worry about at the moment.)

move contents of src to root folder

Since the stuff in src is just what the app actually is, it doesn’t seem to make sense to put it in the separate subfolder. @jorin-vogel can we just move it to the root folder and have grunt run through that?

add document not working

Checking on the live version at http://litewrite.github.com/litewrite/, adding a document does not work.

The console gives me the error: Uncaught SyntaxError: Unexpected token << (main.js line 20)
When I run it on my localhost, I get: Uncaught TypeError: Cannot call method 'get' of undefined (main.js line 20)

Any ideas?

new document improvements

Currently when you start a new document, there is a shadow item added to the documents list. Especially with the sorting #24 coming in, there should be a placeholder title for a new document.

For instance »Start writing →« as document list element which hints towards the editor area. The placeholder would be in grey, and vanish immediately when a title is typed in.

Same for the actual document – when there is no text yet, the first line should have »Heading« or so as placeholder and the second one some text like »Distraction-free writing is amazing …«.

infinite undo

This is a bit of a sophisticated issue, more of a future plan.

Currently, undo basically works until you switch the document or exit Litewrite.

Instead, Litewrite should save deltas of last changes in the document JSON, so that you can Ctrl+Z until the document is empty. From any computer, however long the document is. This is inherent versioning, so we don’t need an extra versioning interface.

cursor misplaced on new document

This only seems to happen in Chrome: On any new empty document, it’s automatically focused but the cursor is on the very top left of the viewport (basically invisible) rather than being on the left of the »Write …« placeholder.

Do you also get this? It’s very irritating because the blinking cursor is an indication that the field is focused and you can write. If it’s not present it seems the field doesn’t have focus – which it has, because you can just start writing.

Mobile version

You should be able to view and edit your docs on the go.
We need a mobile version of litewrite.
Is it possible to build one responsive version which runs on desktop and mobile or is it easier to build two separate versions?

remove local data after disconnect

When disconnecting your remotestorage by clicking the cube in the widget, localStorage should be cleared and the app should be empty.

@nilclass Does this need to be done in every app by the way or can this done by remotestorage.js automatically?

editor set to display:none initially

For some weird reason, the editor is getting set to »display:none«. No idea when or why that happens, but I’m unable to write anything in a new Litewrite instance. Any ideas @jorin-vogel?

limit document list to titles

Currently, the document list just shows the first few words of the document, without cutting anything. Instead, it should just show the title.

For that, it’s probably best to either save the title in a different field or cut the content correctly.

Add scrolling animation to the #entries list

There are two scenarios where it would be nice to see the #entries list scrolling smoothly to a certain position:

  • When the user creates a new doc the list should scroll down to the bottom.
  • And when the app is loaded the list should scroll to the currently open document.

Add Installation Instructions to the README

The build app can be used by opening build/index.html in your browser but to contribute to the project it takes a bit more effort:

  • you must have node.js installed
  • npm installall dependencies
  • (sudo) npm install -g grunt to type gruntinstead of node_modules/grunt/bin/grunt
  • run grunt buildto build the project
  • put the project on a webserver to view src/index.html because it uses XMLHttpRequests:
    • put it on your local Apache
    • or type python -m SimpleHTTPServer 8000
    • or some other server

new document button sometimes doesn’t work

I can’t really pinpoint it, but maybe clicking the document button does nothing. Only after repeated clicking or clicking somewhere else first a new document is opened. There are no errors in the console, but it seems to more likely appear when you had another tab focused previously.

Clean up build/ dir

At the moment require.js copies all files over to build/js/. This should be cleaned up in the build process.

Drag & Drop list items

Docs should be sortable via drag&drop and it would be nice to be able to throw them into the trash.

How to visualize the age of the documents

@jancborchardt :

  1. Maybe there should be small gaps / headings in the list where the docs are from »last week«, »last month«, »last year« etc. Seems to be like a bit of a cop-out though.
  2. Crazy intermittent thought: What about having variable spacing between the documents, depending on when they were last accessed? Let’s say the documents list would by default show in its height a course of a week, or a range so that a minimum of ~3 documents are always shown, whatever occurs first. This is probably just chartporn though.
  3. Another interesting thing in combination with the small headings would be to change the brightness of the document title in the document list. The older the document, the brighter the type becomes (until a certain level where it is still readable). I implemented this in ownCloud for file size and date, and it proves pretty useful to get a quick feeling for where a specific file stands.

All three approaches sound interesting.

  1. The first one looks straight forward but I would like to avoid the need for words in the UI.
  2. This one sounds interesting but I have no idea how to implement it in a way that it is actually usable. Maybe you can explain the idea in a bit more detail.
  3. And the last thought looks cool too as long as you can still read even the title of the oldest document in the list.

use document titles as human-readable addresses

At the moment, the document addresses are numbered, for example litewrite.net/#3

Instead, the document title itself should be used as the address, for example litewrite.net/#todo-list

This is related to #18 limit document list to titles and #19 public sharing.

possibility to start document with empty first line a bit confusing

Currently it is possible to just not put anything in the first line, which leads to some confusing behavior.
The title stays empty at first, as specified in the code: »empty if content starts with '
'« (see #18)
Then, after switching to another document, the title in the navigation bar suddenly is the first piece of text in the document, and switching back to the original document, the formatting effectively changed to put the first line with actual text as the header.

Instead, it should not be possible to omit the first line. By initially not enabling a line break until something has been typed. On the other hand, it should probably be possible to put a line break before the first line after something has been written, in case something needs to be inserted before it.

What are your thoughts?

Syncing of local storage and remote storage

Since the app should be able to work without a connection to the internet and it can be used from more than one device there can occur conflicts between local and remote data.
This conflicts should be solved with the help of timestamps for each single document.
Does remoteStorage.js includes this functionality already?

Automatically sort documents

We have to implement the idea @jancborchardt described in issue #12:

People should not need to sort documents manually, instead they should be automatically sorted by frequency + recency of use.

This will also make the notion of a trash obsolete. Not using a document for long (or rather, using other documents more >recently) will automatically bump it down in the list.

How should the position of a document be calculated based on frequency + recency?

And what happens with old documents? Will the list grow infinitely or should we delete the docs at the bottom?

welcome message, blank slate

Similar to what Etherpad and LightWrite do and similar to the measures in #29, we should have a welcome message in the textarea itself for every fresh user of Litewrite.
People can see that it’s for text, edit it, have a first document in the list, and we can give a very short description or tips.

Keyboard shortcuts

My ideas are:

  • New document: alt+n
  • Open next/previous document: alt+up/down

public sharing & publishing

With remoteStorage support (#7), we can add the ability to publicly share an article. This would make the article show up at litewrite.net/#[email protected]/article (also see #17 about the document address).

Litewrite can then also be used as a publishing tool. If you hardcode your user address in, you could set it up on your personal server and publish articles at yourwebsite.com/#article

Client-side routing

Implement some routes to reflect the current state of the application.
My suggestion would be:

  • new document /
  • /:title

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.