-
Notifications
You must be signed in to change notification settings - Fork 0
[Editor] Open
Julian Curtis-Zilius edited this page May 16, 2018
·
5 revisions
The open method allows you to launch the editor. With this method, you can also specify the HTML that the editor will launch with. This could be used if you need your students to edit some text and use the the elements available in the CanvasTools Editor.
// The ID of the CanvasTools Chrome Extension (Don't change this)
var editorExtensionId = "gmdmngbeceipkojacdoljnllcnfpdgce";
var editor = {
open: {
html: "<p>This is the content the editor will launch with.</p>"
}
}
chrome.runtime.sendMessage(editorExtensionId, {editor: editor}, function(response) {
if (response.editor.open)
console.log('Editor opened successfully!')
});