Coder Social home page Coder Social logo

josephernest / writing Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 76.0 444 KB

Writing is a lightweight distraction-free text editor, in the browser (Markdown and LaTeX supported).

Home Page: https://josephernest.github.io/writing/

JavaScript 93.18% HTML 6.82%

writing's Introduction

Writing

Writing is a lightweight distraction-free text editor, in the browser.

Live version: Writing.

Installation

Just open index.html and that's it! There is no server code. Is that so simple? Yes!

Usage

  • CTRL + D: Toggle display mode

  • CTRL + P: Print or export as PDF

  • CTRL + S: Save source code as .MD file

and a few other commands (change font, etc.) that can be found in:

  • CTRL+SHIFT+H or ? bottom-left icon: Show help

Why another Markdown editor? Why not just use StackEdit?

There are many online editors that support Markdown but:

  • half of them don't support LaTeX / MathJax (for math formulas)
  • some of them do, but have a 1-sec delay between keypress and display, and I find this annoying, see e.g. StackEdit
  • some of them have annoying flickering each time you write new text, once math is present on the page
  • most of them are not minimalist / distraction-free enough for me

That's why I decided to make Writing:

  • open-source
  • no server needed, you can run it offline
  • fast rendering (no delay when writing / no flickering of math equations)
  • just what you need: write, preview, save the code, print or save as PDF, and nothing else
  • LPWP website, a.k.a. "Landing Page=Working Page", i.e. the first page that you visit on the website is the page where things actually happen, that means that there is no annoying welcome page or login page, etc.

About

Author: Joseph Ernest (@JosephErnest)

Other projects: BigPicture, bigpicture.js, AReallyBigPage, SamplerBox, Void, TalkTalkTalk, sdfgh, RaspFIP, Yopp, etc.

Sponsoring and consulting

I am available for Python, Data science, ML, Automation consulting. Please contact me on https://afewthingz.com for freelancing requests.

Do you want to support the development of my open-source projects? Please contact me!

I am currently sponsored by CodeSigningStore.com. Thank you to them for providing a DigiCert Code Signing Certificate and supporting open source software.

License

MIT license

Dependencies

Writing uses Pagedown, Pagedown Extra, MathJax, StackOverflow's editor code, and the Computer Modern font.

Note: Some of these libraries have been slightly modified (a few lines of code), to make it work all together, that's why they are included in this package.

writing's People

Contributors

deseteral avatar foopod avatar josephernest avatar petetnt avatar steve2955 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

writing's Issues

Support dark mode?

I would love to use this in dark mode. Hope it is not very difficult to implement. A possible implementation could be to have a keyboard shortcut to flip the viewing mode.

doesn't support Markdown nested lists

the nested list syntax doesnt render as expected

  1. this should be a list
  • this should be another list
    • this should be a sublist
      1. another one with numbers

It just renders as a flat list in Writing. always creating a new list on every unordered / ordered switch.

Fake bold/italic font styles

Using asterisks or rather the bold/italic markdown syntax results in fake displayed fonts, because the real font styles are missing.

screenshot-2017-10-23 writing

I recommend implementing the missing styles like this:

@font-face {
  font-family: ComputerModern;
  src: url('ComputerModern-Regular.otf') format('otf');
  font-weight: 400;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  font-family: ComputerModern;
  src: url('ComputerModern-RegularItalic.otf') format('otf');
  font-weight: 400;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  font-family: ComputerModern;
  src: url('ComputerModern-Bold.otf') format('otf');
  font-weight: 700;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  font-family: ComputerModern;
  src: url('ComputerModern-BoldItalic.otf') format('otf');
  font-weight: 700;
  font-style: italic;
  font-stretch: normal;
}

Respect cmd key on MacOS

On MacOS native key shortcuts like cmd + s will save an html page instead of Markdown document. When user is using MacOS, application should bind different keys for shortcuts:

CMD + D: Toggle display mode
CMD + P: Print or export as PDF
CMD + S: Save source code as .MD file

etc.

No easy way to access commands without keyboard

When using a device with no physical keyboard (e.g. iPhone, Google Pixel, MS Surface) there is no easy way to access the commands, as there isn't a control key. A button for commands next to the help button seems not too intrusive and very useful.

Change Title Text

I would love functionality to be able to change the <title>Writing</title> text so when I export to pdf I could have the actual title in the upper left corner.

Bookmark files

Would it be possible to bookmark files, eg, have the local file path as a URL parameter or fragment and load that file on opening? I think it'd be my default Word processor if so.

Screen flickering bug

Consider the following input. I cannot find a smaller input.
No matter what you add afterward, it is going to flicker the last mathjax element.

---
title: Small $L_1$ norm solution to a linear Diophantine equation 
tags: number theory
---

Let $a=(a_1,\ldots,a_n)$ be $n$ integers with $\gcd(a_1,\ldots,a_n)=1$. There exist a integral vector $x=(x_1,\ldots,x_n)$, such that $\sum_{i=1}^n x_ia_i = 1$. How large is the solution $x$? By [Bézout's lemma](https://en.wikipedia.org/wiki/Bézout%27s_identity), when $n=2$, we can obtain that $\|x\|\leq \|a\|$. Here $\|\cdot \|$ is the $L_1$ norm. 

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.