Using external libraries

Paid account only

Including JavaScript based on their URL is only possible on a paid account. Documents including external JavaScript files will fail on a free account.

If you need to use a library that transforms your text, applies filters to images or say… inserts charts in your Document, you can import them like you would do in a normal HTML page.

Imagine you’re writing a technical documentation and you want to automatically add syntax highlighting. You could import the Prism library:

HTML
<pre><code class="language-ruby">class Greeter
  def say_hello(name: "Jane")
    puts "Hello #{name}!"
  end
end</code></pre>

<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.27.0/themes/prism.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.27.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.27.0/components/prism-ruby.min.js"></script>
pageIncluding charts in your DocumentspageDebugging your JavaScript

Last updated