Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown support feature #32

Open
mcdoyaji opened this issue Feb 25, 2016 · 2 comments
Open

Markdown support feature #32

mcdoyaji opened this issue Feb 25, 2016 · 2 comments
Assignees

Comments

@mcdoyaji
Copy link

This is great tool. I don't know Why this tool is not famous ....

Anyway, could you make Markdown support feature?

or convert from markdown... I have a bunch of markdown document...

and the convert process is so pain.

@craigdietrich
Copy link
Collaborator

@baram204 Thanks for your note and kind words!

There's a number of markdown to HTML converters online, e.g., https://www.browserling.com/tools/markdown-to-html

Did you have something in mind as to what a built-in markdown converter might do?

@scottkleinman
Copy link

Here's one makeshift solution to grab some Markdown from GitHub. Place the following code in the source of your page:

<script src="https://cdn.jsdelivr.net/remarkable/1.7.1/remarkable.min.js"></script>
<div id="github-content" style="display:none;"></div>

Then add to the pages Javascript options (adding the URL of the raw Markdown document on GitHub):

$(document).ready(function(){
    $("#github-content").load("URL_OF_MARKDOWN.md", function(markdown){
      var md = new Remarkable('commonmark');
      var html = md.render(markdown);
      $("#github-content").html(html).show();
    });
  });

The Scalar user guide warns that $(document).ready() may not work, but it does in this case. Grabbing Markdown content from GitHub allows you to edit offline and get excellent version control. The downside is that your content may not be wrapped in Scalar's proprietary markup, which may be needed for some Scalar functionality (plus, it adds a couple of extra http requests). I haven't tested yet whether the imported content will be retrievable using Scalar's API, for instance.

I think these are the sort of issues that would have to be addressed to add Markdown support. Perhaps CKEditor's Markdown plugin could be enabled to allow Markdown editing online. But I'm not sure what would be required to add specific Scalar functionalities. Still, I hope this is a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants