@@ -120,6 +120,11 @@ are converted to HTML first, then colored by Highlight.js:
|
||||
the content was written in simple Markdown.
|
||||
</div>
|
||||
|
||||
<div class="step slide title markdown" data-rotate="-85" data-x="4000" data-y="2000" data-markdown-dialect="Maruku">
|
||||
This is an example of a slide with a specific Markdown dialect.
|
||||
===============================================================
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var enableBwCss = function(){
|
||||
disableDevopsCss();
|
||||
|
||||
@@ -1566,10 +1566,11 @@
|
||||
var markdownDivs = document.querySelectorAll( ".markdown" );
|
||||
for ( var idx = 0; idx < markdownDivs.length; idx++ ) {
|
||||
var element = markdownDivs[ idx ];
|
||||
var dialect = element.dataset.markdownDialect;
|
||||
|
||||
var slides = element.textContent.split( /^-----$/m );
|
||||
var i = slides.length - 1;
|
||||
element.innerHTML = markdown.toHTML( slides[ i ] );
|
||||
element.innerHTML = markdown.toHTML( slides[ i ], dialect );
|
||||
|
||||
// If there's an id, unset it for last, and all other, elements,
|
||||
// and then set it for the first.
|
||||
|
||||
@@ -40,6 +40,12 @@ HTML and CSS that you can use with that plugin.
|
||||
For your convenience, below is some sample HTML and CSS code covering all the
|
||||
plugins that you may want to use or adapt.
|
||||
|
||||
Additional parameters for addons
|
||||
--------------------------------
|
||||
|
||||
Some addons can handle additional HTML data attributes to help us in further customization:
|
||||
- Markdown-JS: You can pass a specific Markdown dialect to the plugin using `data-markdown-dialect="Another Dialect"`.
|
||||
|
||||
### Sample HTML to enable plugins and extra addons
|
||||
|
||||
<head>
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
var markdownDivs = document.querySelectorAll( ".markdown" );
|
||||
for ( var idx = 0; idx < markdownDivs.length; idx++ ) {
|
||||
var element = markdownDivs[ idx ];
|
||||
var dialect = element.dataset.markdownDialect;
|
||||
|
||||
var slides = element.textContent.split( /^-----$/m );
|
||||
var i = slides.length - 1;
|
||||
element.innerHTML = markdown.toHTML( slides[ i ] );
|
||||
element.innerHTML = markdown.toHTML( slides[ i ], dialect );
|
||||
|
||||
// If there's an id, unset it for last, and all other, elements,
|
||||
// and then set it for the first.
|
||||
|
||||
Reference in New Issue
Block a user