Marvin JS Example - Load Custom Templates (in JSON format)

Back to index

In this example, custom templates are loaded. These templates are stored in templates/default_templates_with_naphtalane.json (URL is relative to the directory of Marvin JS package). To display them on custom template toolbar, define the location of their source file in the data-templateurl attribute of the iframe tag of the editor.

<div class="resizable">
	<iframe src="../editorws.html" id="sketch" class="sketcher-frame" data-templateurl="templates/default_templates_with_naphtalane.json"></iframe>
</div>
		

You can generate your own templates file via the following form: Create template

Back to index