As of Concrete version 5.5.2, it’s now really simple to include as many rich text editors as you’d like on a single block add/edit page or dashboard page:
1: Include this one time (regardless of how many rich text editors you have) at the top of the file:
2: Include these two lines in each place you want a rich text editor:
That’s it – nice and simple! Note that the
Here is a sample
edit.php file from an imaginary block that has two fields for content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
I’ve updated Designer Content in the marketplace to version 3.1, which now includes this functionality. It also makes the generated code simpler, which is a major bonus!
Bonus for astute readers: You may be wondering how the “editor_controls” element (the blue Concrete5 bar that sits above the normal TinyMCE controls) knows which text area to attach itself to… Turns out it doesn’t! The Concrete5 bar will insert images, files, and links into the text editor that currently has the focus (or the last one to have the focus if neither of them has the focus currently). Usually this isn’t an issue because people tend to insert images and links when they’re typing into a specific editor field, so the field they’re typing into will by definition already have the focus. But I can see how this might cause occasional confusion… not a huge deal but something to be aware of.
I did see something in the code that looks like it lets you specify an “id” to apply controls to, but I haven’t had the time or motivation to investigate further. If anyone has any ideas about this, please leave them in the comments.