Comments (2)
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.
from scalar.
@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?
from scalar.
Related Issues (20)
- PHP 8.1 throws errors in development mode HOT 3
- Lens as Advanced Search HOT 1
- Google Maps are no longer loading HOT 1
- Deprecated package yepnope v1.5.3 HOT 1
- CE dates in in timeline don't plot correctly HOT 2
- Changin url on new book throws error
- Resizing window duplicates inline notes HOT 2
- error display/logging? HOT 3
- Feature request: Creative Commons licence select/display HOT 1
- Instance crashes after 5 relationship links HOT 5
- A PHP Error was encountered HOT 3
- Error message returns "object Object" to user in alert HOT 1
- Error message returns JSON parse error in alert to user HOT 1
- Feature Request: Place uploads in separate directory by default
- Error when importing book to custom install HOT 1
- Bulk update page metadata HOT 2
- Feature Suggestion: Anonymous Interactive Lens HOT 1
- Feature Suggestion: List lens should include the queried metadata column HOT 4
- Lenses description not saved HOT 1
- Content search queries with apostrophe/single quote return no results HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalar.