These are chat archives for GetmeUK/ContentTools

30th
May 2016
Anton Komarev
@antonkomarev
May 30 2016 01:13
Hello guys!
Is there is an ability to omit all html tags in region?
For example I will have 2 regions: body with HTML tags and title with only plain text.
Anthony Blackshaw
@anthonyjb
May 30 2016 13:53
@jonasvanderhaegen the name of the region has to be unique, typically the region name/ID is based on an attribute of the region element, by default the id property is used but you can modify this. If you don't specify an id attribute against the region DOM elements then each region should be assigned a numeric ID automatically. What are you seeing currently as region names/IDs?
@a-komarev so yes this has just become possible, if you download the latest version and look at the sandbox demo you'll see use of a fixture to do exactly this. Even if you don't want to use a fixture, you can still restrict what behaviours and tools are allowed in a region, this StackOverflow question might be useful to you in this regard - http://stackoverflow.com/questions/37370944/how-do-i-use-contenttools-to-edit-html-with-a-buttons-links/37498017#37498017
Anton Komarev
@antonkomarev
May 30 2016 14:23
@anthonyjb Thank you, I will look forward to it!
Anthony Blackshaw
@anthonyjb
May 30 2016 15:09
@ArtbyArjan and anyone interested in Bower/NPM install support - long time coming but CT and accompanying libraries are on both Bower and NPM now.
Anton Komarev
@antonkomarev
May 30 2016 15:29
NPM support is sweet
@anthonyjb I thought about small visual enhancement of your tool. When there is no content in region and edit mode is turned on - maybe there is a good idea to add transparent node with + sign to show that something could be inputted there? And by clicking on it insert new <p>. This ghost new node block could be used when region ends with Image\Video too.
Anton Komarev
@antonkomarev
May 30 2016 15:34
Or it could be turned on in settings of region and will be displayed all the time when in edit mode.
Anton Komarev
@antonkomarev
May 30 2016 21:50
I found a minor bug. If region is empty on a init and I wrote down some symbols in it and after that i will removed them it Object.keys(regions).length will be equal to 1. So, region is still empty, but editor says that something has been changed.
Anthony Blackshaw
@anthonyjb
May 30 2016 22:57
Hi @a-komarev - any chance you post the bug along with the steps to replicate on the issue tracker here: https://github.com/GetmeUK/ContentTools/issues (ty in advance)
Also I agree about adding a visual indicator for empty text elements, I'll look at this in the next release
Anton Komarev
@antonkomarev
May 30 2016 23:43
@anthonyjb thanks! I will create 2 detailed issues, 1 for bug and one for visual indication.
Anthony Blackshaw
@anthonyjb
May 30 2016 23:51
@a-komarev thanks :smile: