Code Monkey home page Code Monkey logo

msk-markdown's Introduction

MSK Markdown

MSK Markdown is light markdown editor and viewer.

Screenshots:

Light Mode:

MSK Markdown - Light Mode

Dark Mode:

MSK Markdown - Dark Mode

Platform

Google Chrome, Mozilla Firefox, Microsoft Edge, Opera.

Windows, macOS, Linux (All distributions).

Development

MSK Markdown developed in HTML5, CSS3, Native JavaScript.

CSS & Fonts Libraries used:

  1. HighLight JS Dracula Dark Theme.
  2. Google Fonts (Roboto Mono 400, 700).

JS Libraries Used:

  1. MathJax JS 2.7.5.
  2. Marked JS.
  3. DOMPurify JS 2.3.3.
  4. Highlight JS.
  5. Sync Scroll JS.

License

MSK Markdown licensed under MIT License 2021.

Contributions

Developed & Created by Kevin M. Mansour.

msk-markdown's People

Contributors

chase-mortensen avatar harshkanjariya avatar kevinmmansour avatar khantparthkumara avatar lee-jongwoo avatar mahmoudgalalz avatar mod7ex avatar oaphi avatar sanidhyy avatar vaishak10 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

msk-markdown's Issues

marked is not a function

Describe the bug
we have a amazing error and it is marked is not a function;
with this error website can not compile my markdown and it freezes.
i type many word but it compiles 2 letter.

Screenshots
image

Make msk-mardown an angular module

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
MSK-Markdown is undoubtedly a very good solution for those of us who want to integrate a markdown editor to their apps without having to go through implementing one by themselves. As it now stands the editor can be used in an angular application but that would require a lot more work than if it was packaged as an angular module natively. Of course, porting it to other frameworks than Angular would be great but, this feature request is about Angular.

Describe alternatives you've considered
Using the editor as a non-Angular module.

Spaces is ignored in the preview section

Describe the bug
The spaces is ignored in the preview section
when I write anything without using md cmd it only take one space

in the inline code there's no spaces however I put a lot of spaces

this issue not appear in the block code md

Desktop (If applicable, please complete the following information):

  • OS: [Linux]
  • Browser [Google Chrome]
  • Version [2.0]

Col doesn't update when moving cursor with arrows

Steps to reproduce:

  • Add some random text in the markdown textarea.
  • Notice the Col value changes as you type.
  • Move the cursor with the arrows.
  • The Col value remains the same unless you type another character or you click inside the textarea.

XSS Security Vulnerability

Try entering this markdown syntax:

[Click Me](javascript:alert('XSS'))

This can allow malicious scripts to run on any user's browser that views this.

These problems are also mentioned in marked.js too:

Warning: ๐Ÿšจ Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! ๐Ÿšจ

I'm no security expert, but I'm pretty sure:
We'll need to sanitize the inputs.

IMPORTANT: We need to sanitize the markdown after marked.js processes it, because of attacks like this:

> hello <a name="n"
> href="javascript:alert('XSS')">*you*</a>

when click on download button without name file is saving

Describe the bug
When we click on the download button without giving name to the file it is saving which should not happen right.

Desktop (If applicable, please complete the following information):

  • OS: [linux]
  • Browser [Google Chrome]
  • Version [ 97.0.4692.99 ]

Save on local storage

if we are working on documentation or something like that,
I think it would be a disaster if the browser is closed.

So I would like to save the text on our local storage

Include the .md extension on CONTRIBUTING and LICENSE

What is the improvement?
Github formats markdown files nicely, but it doesn't recognize these files as being markdown since they are missing the extension.
Additional context
I think this small fix would improve the readability of these files. I plan on making a PR.

Side note: This is my first issue/PR, so any suggestions are welcome. Thanks

Uncaught TypeError: this.save is null

Describe the bug
Error: Uncaught TypeError: this.save is null.

Screenshots

Screenshot

Desktop:

  • OS: Windows10
  • Browser : Firefox
  • Version 89.0.1

Additional context
Full console error:

Uncaught TypeError: this.save is null
    CreatePreview https://msk-markdown.netlify.app/main.js:79
    execute https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured:19
    cb https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured:19

Remove styles when style buttons are pressed

Is your feature request related to a problem? Please describe.
Many markdown editors like the one I'm typing on right now support this feature. When you select text that is already boldface and press the bold button, the boldface is removed.

Describe the solution you'd like
On button click (in the apply() function) check whether the selected text already matches the style, and if so remove the style.

Describe alternatives you've considered
Apply styles over again when button press (current version)

Additional context
It would be better to show a gray background when the user selects a text that already has styles applied (like MS Word)

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.