jejacks0n/mercury

few questions.

lis-kr opened this issue · 1 comments

First, really nice editor! I have to use this editor locally without a web server. My site is a presentation (using reveal.js as basis) which includes eight different templates for using. Each template is a section. So my question, is it possible to add or duplicate a specific template/section dynamically?
One template uses a fullscreen image (background-size:cover) is there a drag and drop function as well possible?

This presentation-site is included in the index.html via javascript. Does the editor work anyway although the site is included?

Are you working coincidentally on a new release next time?

I'm not positive I understand what you're asking.. but a few things:

You'll just want to grab the javascript and use that.

Saving uses ajax (which expects a server) so you'll need to change how saving works.. maybe local storage or something? That means you'll probably have to change how loading works too, but that's relatively easy.. find regions and put the local storage copy into them before initializing mercury. This is something that I haven't ever done anything with, but sounds kinda interesting (it defeats my purposes for presenting that content to other users, but would make sense in your case).

You can add new regions and tell Mercury to load new ones.. use Mercury.trigger('reinitialize'), which will allow you to add new areas to the page (or slide as the case may be), and then initialize those into regions so they can be edited.

For the background image, this is possible, by making it a custom region.. I've done this, but it depends on how you're styling it to be honest. I inherited from the image region and instead of setting source, I set the background-image css attribute. https://gist.github.com/jejacks0n/7875807

Hopefully that helps.