These are chat archives for GetmeUK/ContentTools

17th
Apr 2017
Abishek R Srikaanth
@abishekrsrikaanth
Apr 17 2017 19:30
is it possible to
  1. Restrict/Switch Off Dragging feature completely
  2. Disable editor events on specific elements/tags?
Anthony Blackshaw
@anthonyjb
Apr 17 2017 20:38
Hi @Samuell1 - sorry chap not sure I understand your first question? Do you want a tool to convert Coffee to JS?
@abishekrsrikaanth I typical store it in a JSON string representing the page regions for traditional SQL dbs, and for NoSQL or SQL where JSON is supported directly (e.g PostgreSQL 9.2+) I store it in a directly in a dict.
@abishekrsrikaanth tto prevent an element being edited use the static tag, e.g add data-ce-tag="static" to an element
Anthony Blackshaw
@anthonyjb
Apr 17 2017 20:45
to restrict a particular behaviour you can use behaviours (http://getcontenttools.com/api/content-edit#behaviours) - here's an example of how you might apply them GetmeUK/ContentTools#343
Abishek R Srikaanth
@abishekrsrikaanth
Apr 17 2017 20:46
@anthonyjb, thnx. I am just try to understand how the development workflow will be. So if I have 10 pages that I want to make editable using this package.
  1. Each page may vary on the number of editable regions. So how do I go about storing. I know each one of the developers who have used this package would have gone through this process, so just trying to understand if there is a best practice. Don’t want to waste a lot of time re-inventing the wheel
  2. Do I first design the page and then divide them into regions and store the html on the database and bind it from there?
when you say json string, you mean the {name: html_content}for sql?
Anthony Blackshaw
@anthonyjb
Apr 17 2017 21:53
@abishekrsrikaanth I'd recommend you read through http://getcontenttools.com/tutorials/saving-strategies - it contains examples for saving to NoSQL or SQL dbs as well as direct to files and I think it should fully answer your question