mirror of https://github.com/yjwen/org-reveal.git
generate iframe directly
Removes need for a javascript snippet in the reveal.js directory by directly generating iframe code on export.
This commit is contained in:
parent
7b1d8520bf
commit
e6bb3e376e
25
ox-reveal.el
25
ox-reveal.el
|
@ -997,6 +997,12 @@ contextual information."
|
|||
(format " id=\"%s\"" lbl))))
|
||||
(klipsify (and (assoc 'klipse org-reveal-external-plugins)
|
||||
(member lang '("javascript" "ruby" "scheme" "clojure" "php"))))
|
||||
(langselector (cond ((string= lang "javascript") "selector_eval_js")
|
||||
((string= lang "clojure") "selector")
|
||||
((string= lang "python") "selector_eval_python_client")
|
||||
((string= lang "scheme") "selector_eval_scheme")
|
||||
((string= lang "ruby") "selector_eval_ruby"))
|
||||
)
|
||||
;;(klipse-hidden (if (assoc 'klipse org-reveal-external-plugins) " style=\"display:hidden;\"") nil)
|
||||
)
|
||||
(if (not lang)
|
||||
|
@ -1004,6 +1010,7 @@ contextual information."
|
|||
(or (frag-class frag info) " class=\"example\"")
|
||||
label
|
||||
code)
|
||||
(cond ((eq lang "javascript ")))
|
||||
(format
|
||||
"<div %sclass=\"org-src-container\">\n%s%s\n</div>%s"
|
||||
(if klipsify "style=\"display:none;\" " "")
|
||||
|
@ -1019,8 +1026,22 @@ contextual information."
|
|||
(format " class=\"src src-%s\"" lang))
|
||||
label code)
|
||||
)
|
||||
(if klipsify (format "<klipse-snippet data-language=\"%s\">%s</klipse-snippet>"
|
||||
lang code) ""))))))
|
||||
;; (if klipsify (format "<klipse-snippet data-language=\"%s\">%s</klipse-snippet>"
|
||||
;; lang code) "")
|
||||
(if klipsify (concat "<iframe height=\"500px\" width= \"100%\" srcdoc='
|
||||
<pre><code class= \"klipse\">
|
||||
" code "
|
||||
</code></pre>
|
||||
<link rel= \"stylesheet\" type= \"text/css\" href=\"" org-reveal-klipse-css "\">
|
||||
<style>
|
||||
.CodeMirror { font-size: 2em; }
|
||||
</style>
|
||||
<script>
|
||||
window.klipse_settings = { " langselector ": \".klipse\" };
|
||||
</script>
|
||||
<script src= \"" org-reveal-klipse-js "\"></script>
|
||||
'>
|
||||
</iframe>") "") )))))
|
||||
|
||||
(defun org-reveal-quote-block (quote-block contents info)
|
||||
"Transcode a QUOTE-BLOCK element from Org to Reveal.
|
||||
|
|
Loading…
Reference in New Issue