Package Exports
- @acarl005/codeflask
- @acarl005/codeflask/build/codeflask.min.js
- @acarl005/codeflask/build/codeflask.module.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@acarl005/codeflask) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CodeFlask Mod
npm i '@acarl005/codeflask'I modified CodeFlask to be able to...
- Make PrismJS a peer dependency
- Attach custom event listeners to the editor
- Support the Line Highlight plugin in PrismJS
- Fix this issue: kazzkiq/CodeFlask#69
import CodeFlask from "codeflask"
import Prism from "prismjs"
const flask = new CodeFlask(editor, Prism, {
language: "html",
customEventListeners: {
"keydown": e => {
if (e.key == "Enter") {
e.preventDefault()
e.stopImmediatePropagation()
// do custom stuff
}
}
}
})
flask.highlightLines("4-7")PrismJS is highly customizable. It actually offers custom builds with more plugins that you can opt into. This is an awesome and rare feature b/c you can minimize the bundle by omitting unneeded functionality. Therefore, it should be a peer dependency, b/c CodeFlask can't know which build with which plugins you'll need.