<h1 data-simply-field="title">Title</h1>
Makes an HTML element editable in the browser in editmode. It also adds the contents to the data store. This means that you can change the contents of the field in javascript simply by changing the javascript object, like this:
editor.pageData.title.innerHTML = 'New Title';
This attribute can be set on any HTML element. Depending on which HTML element, it will expect and set different properites:
A: href, title and innerHTMLIMG: src, alt and titleINPUT: value- ...
Fields may not contain other fields, except when using data-simply-content="fixed".
Fields with the same name on the same page will always have the same content. Except when the
field is part of a list entry, or if you've specified a different path with data-simply-path.
<a data-simply-field="link" data-simply-content="fixed">
<img data-simply-field="image">
</a>
Tells SimplyEdit what kind of content the field may contain. Expects one of the following values:
fixedOnly attributes on the element are editable. The innerHTML will not be set or updated.attributesOnly make the attributes of the element editable. By default all attributes will be stored. You can override this with thedata-simply-attributesattribute.templateThe value of the field will be used to select a template. The template name must match the value of the field. If the field is not available in the data store yet, you can set a default value with thedata-simply-default-valueattribute.
<button data-simply-field="product" data-simply-content="attributes"
data-simply-attributes="data-item-id data-item-name data-item-price"
>Buy Now</button>
<div data-simply-field="product.data-item-id">1</div>
<div data-simply-field="product.data-item-name">Name</div>
<div data-simply-field="product.data-item-price">99</div>
<input type="radio" name="size" value="small" data-simply-field="size">Small
<input type="radio" name="size" value="large" data-simply-field="size">Large
<div data-simply-field="size" data-simply-content="template">
<template data-simply-template="small">
Small size selected
</template>
<template data-simply-template="large">
Large size selected
</template>
</div>