toh82 / page-generator

0 stars 0 forks source link

implement simple editable content #7

Open toh82 opened 8 years ago

toh82 commented 8 years ago

This story is about making simple elements editable via the contentEditable attribute, if you don't know it check MDN Content Editable.

The magic has to happen in web/public/src/js/app/views/dynamicElement.js where it should check if the template is editable (model has editable:true) and if so, put everywhere the attribute type is direct the contentEditable attribute on it's wrapping HTML.

Example

taken from resources/templates/container/two-column/config.json

        "title": {
            "value": "foobar",
            "type": "direct"
        }

Workflow

toh82 commented 8 years ago

Content editing has to be a bit more complex, we need two-way​ binding so consider using http://nytimes.github.io/backbone.stickit/