1.0.2 • Published 6 years ago

reveal-ace-editor v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

reveal.js ACE Editor plugin

Forked from https://github.com/Gottox/reveal.js-ace

reveal.js-ace is a reveal.js plugin that allows to embed ACE editors in a reveal.js presentation.

Installation

Download and install the package in your project:

bower install Gottox/reveal.js-ace

Add the plugin to the dependencies in your presentation, as below.

Reveal.initialize({
	// ...
	dependencies: [
	// ... 
		{ src: 'bower_components/reveal.js-ace/ace.js' }
	]
});

And embed the editor

<iframe class="ace" width=600 height=500 data-onchange="console.log(editor.getValue())">
Hello World!
</iframe>

Configuration

You can configure the editor for your presentation by providing a ace option in the reveal.js initialization options. Note that all config values are optional and will default as specified below.

Reveal.initialize({
	// ...

	ace: {
		// Event is triggered when a new editor is created.
		oninit: function(editor) {

		},
		// Event is triggered when the text of an editor has changed
		onchange: function(event, editor) {

		},
		// Automatically focus an editor when it is displayed
		autoFocus: false,

		// defines a css class name for the ace editors
		className: "ace"
	}
});
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago