These are chat archives for GetmeUK/ContentTools

Jun 2016
Jun 09 2016 08:02
Hi, its there a tutorial for creating a new tool in toolbar with js? like more h3
Anthony Blackshaw
Jun 09 2016 08:41
Hi @Samuell1 - there's a tutorial on creating a new tool from scratch using CoffeeScript ( but there's not one for JS at the moment. Having said that if you just want add an H3 tool here's a gist to do that in both CoffeeScript and JavaScript
Anton Komarev
Jun 09 2016 10:43
@anthonyjb Ah... Anthony I forgot to ask one more important thing. I've made 2 regions: title, body. Title is placed in <h1> and body is common <div>. But when I'm starting to type in Body region - first row in it all the time is <h1>. How to make regions starts from <p> row?
Anthony Blackshaw
Jun 09 2016 11:56
@a-komarev can you paste your HTML here for me to look at?
Anton Komarev
Jun 09 2016 12:03
@anthonyjb sure, right from sandbox... just remove all data from article region
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>ContentTools sandbox</title>
        <link rel="stylesheet" type="text/css" href="sandbox.css">
        <link rel="stylesheet" type="text/css" href="../build/content-tools.min.css">
        <article class="article">
            <section class="article__content"  >

                <h1 data-fixture data-name="article-title">


                <div data-editable data-name="article">

        <script type="text/javascript" src="../build/content-tools.js"></script>
        <script type="text/javascript" src="sandbox.js"></script>
Anthony Blackshaw
Jun 09 2016 13:27
that's a bug with my last release
so I accidentally left h1 as the default for the new region (when testing) it should be p
I'll push a fix in the next release, in the meantime either override the createPlaceholderElement method against the EditorApp or if you change the method in place (replacing h1 with p)