Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@centerforopenscience/markdown-it-atrules
Advanced tools
Markdown-it plugin to embed files with the OSF's MFR
Weekly downloads
Readme
markdown-it plugin for embedding MFR files.
md = require('markdown-it')({
html: true,
linkify: true,
typography: true,
}).use(require('../'), {
type: 'osf',
pattern: /^http(?:s?):\/\/(?:www\.)?[a-zA-Z0-9 .:]{1,}\/render\?url=http(?:s?):\/\/[a-zA-Z0-9 .:]{1,}\/([a-zA-Z0-9]{5})\/\?action=download|(^[a-zA-Z0-9]{5}$)/,
format(assetID) {
var id = '__markdown-it-atrules-' + (new Date()).getTime();
return '<div id="' + id + '" class="mfr mfr-file"></div>' +
'<script>$(document).ready(function () {new mfr.Render("' + id + '", "' + getMfrUrl(assetID) + '"); }); </script>';
}
This plugin is made to work in the inline style. If you'd like a block-style, you may be interested in https://github.com/rotorz/markdown-it-block-embed
This plugin allows you to use the OSF's Modualar File Renderer or the MFR to embed video or other files into your markdown assuming your page has mfr.js and mfr.css loaded.
@[osf](kuvg9)
is interpreted as
<p><div id="randomId" class="mfr mfr-file"></div><script>$(document).ready(function () {new mfr.Render("randomId", "https://mfr.osf.io/render?url=https://osf.io/kuvg9/?action=download%26mode=render"); }); </script></p>
Alternately, you could use the url.
@[osf](https://mfr.osf.io/render?url=https://osf.io/kuvg9/?action=download)
FAQs
Markdown-it plugin to embed files with the OSF's MFR
The npm package @centerforopenscience/markdown-it-atrules receives a total of 334 weekly downloads. As such, @centerforopenscience/markdown-it-atrules popularity was classified as not popular.
We found that @centerforopenscience/markdown-it-atrules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.