Giter Club home page Giter Club logo

markright's Introduction

This project is currently frozen. If you want to help developing it, please feel free to ping me

banner

a minimalistic github flavored markdown editor

screenshot

Download

On mac, install it through cask:

brew install --cask markright

Alternatively, check out the latest release to quickly find the latest version. Here are the current binaries:

Command line

On mac, you can launch markright from the command line with a little alias:

alias markright="open -a /Applications/MarkRight.app"
markright README.md

Building

MarkRight is written in clojurescript. To build, make sure you have clojure and leiningen installed on your system.

Requirements

  • npm
  • leiningen
  • bower
  • npm install
  • bower install

Compiling

All commands you need are available inside package.json. To compile the code, run npm run compile:<prod/dev>. node/ is the folder that goes into electron.

Development

To develop, run the self-reloading build:

  • lein run -m build/ui-dev
  • lein run -m build/main-dev

shadow-build will live-reload the frontend so you don't need to refresh. If you change main.cljs however, you'll have to restart electron to reload your changes.

License

Licensed under GPLv3

markright's People

Contributors

dvcrn avatar opexxx avatar orionx86 avatar sam3d avatar swhgoon avatar voluong 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

markright's Issues

Consider shadow-build as build tool

https://github.com/thheller/markright/tree/shadow-build

I was curious how your build config would look using shadow-build but sort of rewrote several parts of your app in the process. I always needed an excuse to play with electron, sorry I went a little OCD on your code.

Re-organized the code a bit and threw some stuff out. Code now lives in src/cljs. Most of this probably wasn't required but your old structure had multiple versions of markright.core which was very confusing to me.

You can test things by doing
lein run m build/main-dev and lein run -m build/ui-dev

Then open electron via electron node (I moved everything "package" related into the node directory, what was app before is now in node/ui).

The main-dev process recompiles files whenever something changes but does not attempt to reload anything (so requires an electron restart). The ui-dev process is sort of figwheel-ish with auto-compile/reload and a REPL for the UI.

Anyways, the new build code now is here:
https://github.com/thheller/markright/blob/shadow-build/src/dev/build.clj

If you are interested I can walk you through some stuff.

Add support for creating new window

Things to do:

  • open-file event should open a new window
  • Ctrl/Cmd + N should create a new window
  • Ctrl/Cmd + O should open the file in the current frontmost window
  • update notifications should appear in the current frontmost window
  • dev tools should open in the front most window
  • reload should reload the front most window
  • exit / quit should check all open windows for unsaved changes

Things to investigate:

  • will our IPC implementation work with multiple windows?

Launch from command line support

To be able to launch it from command line is a step forward for all devs out there.

So we could use it like:

$ alias markright="~/Applications/MarkRight.app/Contents/SharedSupport/bin/markright"
$ markright README.md

It's beautiful, isn't it? (♥‿♥)

Ugly error message when trying to save a read-only file

If I try to save a file that is read-only on disk (tested on Windows 10), I get an ugly error dialog:

[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EPERM: operation not permitted, open 'C:\TFS\_Current\Horizon\_Documentation\Test.md'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
    at Object.fs.writeFileSync (fs.js:1171:15)
    at Object.markright.main.write_file_BANG_ (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2650:415)
    at C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2675:258
    at d (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2672:382)
    at b (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2673:330)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:1947:333)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:1948:116)

[OK]

This error situation should be handled in a more end-user-friendly dialog (something like "File could not be saved because it is write-protected.").

Windows: File association problem

I associated *.md files to be opened with MarkRight, but when I double-click on any .md file, MarkRight starts with a blank document.

Windows network drives not accessible

You cannot access mounted network drives on MS windows. If you select the file by using the unc path, e.g. \\server\folder\file.md everything works as expected. But if you use the mounted network drive path, e.g. f:\file.md (with f: pointing to \\server\folder), you cannot access that location.

README gets in the way of working with MarkRight

Showing the README on first start is a nice touch, but opening/working with files in MarkRight 0.1.6 is a pain right now.

  • I cannot start MarkRight with a clean editing window, the README is always there
  • Opening a file will open a dialog box telling me that changes will be lost
  • Passing a file name as a command line parameter to markright.exe doesn't seem to work.

(Tested on Windows 10)

BTW: Nice editor!

Need right-click for Inspect Element

In the browser it is possible to right-click on the screen and select "Inspect Element" causing the developer window to open at that position of the displayed DOM tree.

Already from the Markdown, using the developer window, it is possible to select any part of the displayed DOM tree and see the selected element in the wysiwyg html window. I need to allow clicking in the wysiwyg html window to initiate this and trigger display of developer window at element selected... as can be done in an web browser session.

Missing Icon

I installed markright on Ubuntu 16.04 and there's no icon with it.

Linux version

The current release process is already building for linux, I just don't know what to do with this folder or how to package it.

screen shot 2015-11-04 at 12 12 56 pm

Markright not working with window management software in OSX.

Needs more investigation into how my particular window management software (SizeUp) actually works but commands to switch monitors, switch spaces, resize, and move the markright window fail to actually do anything. SizeUp shows it's display indicating that it's doing it's part correctly but markright doesn't appear to be responding to the events.

HTML Export

It would be helpful if there were a menu item (or whatever) that would let me Export Generated HTML.

Suggestions:

  1. File -> Export HTML...
  2. Edit -> Copy as HTML
    • This would copy a fragment, no surrounding <html><body>

(I'm currently using MarkRight to write in a sane environment and then paste HTML into a CMS input.)

Unsaved changes reported without editing anything

Repro (on Windows 10)

  • Start MarkRight
  • Open Markdown document
  • Don't change anything
  • Application window title does NOT show a "changed" indicator (*)
  • Close application window
  • Dialog box appears: "There are unsaved changes. Are you sure you want to continue? Your changes will be lost"

If I save the document immediately after opening it, I don't get the message. In general, the handling of the "changed" state seems to work correctly after the first save.

Scrollbar issue

On the most recent linux x64 binary, I still had the scrollbar issue mentioned in #21. I'm not sure how to properly contribute the fix (never done it before, and don't want to step on any toes), but here's how I fixed it.

I made two changes to main.css:

  • under line 43, #parsed markdown {, I added width: 50%;
  • under line 51, .markdown-body {, I added width: 100%;

For the record, everything else I tested in the build seems to work well. Great job!

ENOENT

on windows, if you want to create a file from scratch, and you don't open an existing one, when you want to save your md it throws the fallowing error
capture

Choose installation path

Problem/Reproduction: When you launch the installer on Windows and click the install button, the program will be installed directly into a predefined directory.

Expected result/Solution: On windows this behaviour is not expected, so there should at least be a warning, i.e. The program will be installed to c:/whatever. Yes/No?. The better way would be asking for user for choosing a directory (which can be set to a default value if the user does not choose one).

Error after launching on Windows

After launching either the 32 or 64 bit build on Windows 10 (build 10565), I'm shown the following error message. (Nothing else is shown.)

2015-11-09 22_56_14-start

Anything I can do to debug the issue?

After some further investigation, release 0.1.1 launches, but opens to a blank window.

Can't save new file

Opening an already existing file allows me to File > Save just fine, but try to File > Save as a new file and it throws an error.

image

Whatever filename is provided, the error message makes it look like it's trying to save to a glob: filename.*.

Unsure how to check the version number, but I believe this is 0.1.8 I'm using. Windows 8.

Rendering issue and scrollbar

This is for the Windows 64-bit installer version at 0.33.6.

image

Rendering Issue

The following Markdown...

1. A list
2. More list

* First level
  * Second level

...which renders as the following, on GitHub...

  1. A list
  2. More list
  • First level
    • Second level

...is rendering as in the screenshot, above, in MarkRight.

Scrollbar

There's a funny floating scrollbar showing in the screenshot, above.

Markdown

I've put the text of my Markdown test document into a gist, here:
https://gist.github.com/nazrhyn/40683f37ff3298f95ebd

Add "Export as PDF" functionality

It would be nice to have the possibility to export a document to PDF, so that others that don't have a Markdown Editor can read the document too

Task list checkboxes aren't rendered

GFM supports task lists using the syntax:

- [ ] a
- [x] b
- [x] c

which gets rendered as pretty checkboxes:

  • a
  • b
  • c

Currently markright does not seem to support this. Not sure if it's planned to be supported or not because it's obviously a little more in depth than the typical markdown rendering (should clicking checkboxes in the render view update the file contents?) but I figured I should open an issue just to document whether or not that's the case.

TCP connection error

Two errors are shown if the application cannot connect to the internet upon launching (they do not hamper functionality after they've been closed)

2015-11-09 23_27_59-photos
2015-11-09 23_28_16-photos

Auto Formatting / Beautifying

It'd be useful if this editor integrated auto-formatting. Something like tidy-markdown should do the trick. Then one could just have an option for doing it on save or with a key combination.

Local images aren't loading

I created this markdown file using Atom (with MarkdownPreview) and it looked fine there. It also renders fine GitHub. But markright seems to have issues loading the images. The demo markdown that markright starts with is using an online image, so I'm guessing the issue is with local images.

image

image

Update to electron v1.0

On first sight this breaks almost everything.

  • All electron related imports are now properties on require "electron"
  • IPC split into ipcMain and ipcRenderer

will update this when I find more things

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.