Presentation creation

Typically, to instantiate the CodeMirror editor, you create a <textarea> element with the initial editor content and call the following JS code:

varmyCodeMirror = CodeMirror.fromTextArea(myTextArea);

Creating a presentation is just as easy: you create a <textarea> with the initial content of the editor and add the presentation script there, separating these sections with the @@@ line:

<textareaid="code">

&lt;div class="content"&gt;

|&lt;/div&gt;

@@@

type: Hello world

wait: 1000

tooltip: Sample tooltip

</textarea>

To initialize the video, you need to call the CodeMirror.movie () method, passing the first parameter the ID of the <textarea> element or the element itself:

varmovie = CodeMirror.movie('code');

// start playback

movie.play();