diff --git a/ox-reveal.el b/ox-reveal.el index d2de629..c3d4ce1 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -101,6 +101,7 @@ (:reveal-single-file nil "reveal_single_file" org-reveal-single-file t) (:reveal-extra-script "REVEAL_EXTRA_SCRIPT" nil org-reveal-extra-script space) (:reveal-extra-script-src "REVEAL_EXTRA_SCRIPT_SRC" nil org-reveal-extra-script-src split) + (:reveal-extra-script-before-src "REVEAL_EXTRA_SCRIPT_BEFORE_SRC" nil org-reveal-extra-script-before-src split) (:reveal-init-options "REVEAL_INIT_OPTIONS" nil org-reveal-init-options newline) (:reveal-highlight-css "REVEAL_HIGHLIGHT_CSS" nil org-reveal-highlight-css nil) (:reveal-reveal-js-version "REVEAL_REVEAL_JS_VERSION" nil nil t) @@ -321,7 +322,12 @@ Example: :type 'string) (defcustom org-reveal-extra-script-src '() - "Custom script source that will be embedded in a tags before the call to Reveal.initialize() + (let ((before-src-list (let ((l (plist-get info :reveal-extra-script-before-src))) + ;; map to a single string to a list. + (if (stringp l) + (list l) + l)))) + (and before-src-list + (mapconcat (lambda (src) (format "" src)) + before-src-list + "\n"))) + + ;; Reveal.initialize (let ((reveal-4-plugin-statement (cdr reveal-4-plugin)) (init-options (plist-get info :reveal-init-options))