Search code examples
umbracoumbraco7

Umbraco - Add more than one RTE in Custom Grid Editor


I am creating custom grid editor and I would like to have more than one RTE inside of it. Currently, I am initializing RTE like this

            <div unique-id="control.$uniqueId"
                 value="control.text1"
                 grid-rte configuration="control.config.rte">
            </div>

This works fine for one instance of RTE. However, when I try to add 2nd or 3rd RTE in this manner, they are not initialized, instead I am getting multiline textbox.

So, how to add more than one RTE, and, is this best way to add RTE?


Solution

  • I had the same problem. I have solved the problem by adding $index. Like so:

                    <div unique-id="control.$uniqueId + $index"
                         value="control.text1"
                         grid-rte configuration="control.config.rte">
                    </div>