Render AsciiDoc preview
This commit is contained in:
parent
38719347c8
commit
581cb917b7
|
@ -143,6 +143,12 @@ define([
|
|||
previews['htmlmixed'] = function (val, $div, common) {
|
||||
DiffMd.apply(val, $div, common);
|
||||
};
|
||||
previews['asciidoc'] = function (val, $div, common) {
|
||||
require(['asciidoctor'], function (asciidoctor) {
|
||||
var html = asciidoctor.convert(val, { attributes: 'showtitle' });
|
||||
DiffMd.apply(html, $div, common);
|
||||
});
|
||||
};
|
||||
|
||||
var mkPreviewPane = function (editor, CodeMirror, framework, isPresentMode) {
|
||||
var $previewContainer = $('#cp-app-code-preview');
|
||||
|
|
|
@ -20,7 +20,9 @@ define([
|
|||
'netflux-client': '/bower_components/netflux-websocket/netflux-client',
|
||||
'chainpad-netflux': '/bower_components/chainpad-netflux/chainpad-netflux',
|
||||
'chainpad-listmap': '/bower_components/chainpad-listmap/chainpad-listmap',
|
||||
'cm-extra': '/lib/codemirror-extra-modes'
|
||||
'cm-extra': '/lib/codemirror-extra-modes',
|
||||
// asciidoctor same
|
||||
'asciidoctor': '/lib/asciidoctor/asciidoctor.min'
|
||||
},
|
||||
map: {
|
||||
'*': {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,4 +12,5 @@ This file is intended to be used as a log of what third-party source we have ven
|
|||
* [Fabricjs 4.6.0](https://github.com/fabricjs/fabric.js) and [Fabric-history](https://github.com/lyzerk/fabric-history) for the whiteboard app
|
||||
* [Requirejs optional module plugin](https://stackoverflow.com/a/27422370)
|
||||
* [asciidoc.js 2.0.0](https://github.com/asciidoctor/codemirror-asciidoc/releases/tag/2.0.0) with slight changes to match the format of other codemirror modes
|
||||
* [Asciidoctor.js 2.2.6](https://github.com/asciidoctor/asciidoctor.js/releases/tag/v2.2.6) for AsciiDoc rendering
|
||||
|
||||
|
|
Loading…
Reference in New Issue