Solution:
You've run into a known issue with October CMS/Laravel backend forms when combining a "simple" Repeater and a Richeditor (richeditor/TipTap). With "simple" mode, the repeater saves values as flat arrays, but the Richeditor (TipTap) expects each item to be an object (associative array) keyed by the field name, not just a flat value. When that’s not the case, TipTap throws an error and doesn't render the content.
How to Fix
You have a couple of ways to address or work around this:
1. Use "Normal" Repeater Instead of Simple
If you don't need the "simple" Repeater (where you only have one field in each item), switch to the normal Repeater mode—this will store each item as an associative array, and the Richeditor will render correctly.
Example:
fields:
repeater_field:
label: Repeater
type: repeater
prompt: Add item
form:
fields:
my_content:
label: Content
type: richeditor
2. Post-Process the Data for the Simple Repeater
If you must use the "simple" Repeater (e.g., for backward compatibility), you need to convert the flat array format into an associative format so the Richeditor JS can read it.
Example conversion in your model (or controller):
public function getMyRepeaterAttribute($value)
{
// Decode JSON
$array = json_decode($value, true);
// Check if it's flat and needs keying
if (is_array($array) && isset($array[0]) && !isset($array[0]['my_content'])) {
// Convert to expected format
$array = array_map(function($item) {
return ['my_content' => $item];
}, $array);
}
return $array;
}
Replace
my_contentwith your actual richeditor field name.
3. Custom JS Workaround (Not recommended)
You could forcibly adapt the data with custom JavaScript before TipTap initializes, but this is brittle and discouraged.
Summary
- The "simple" Repeater stores a flat array, which breaks components expecting an object per item (like
richeditor). - Best solution: Use a normal repeater (not simple).
- If you must use a simple repeater, convert the saved data to the proper structure in your model’s accessor.
Reference:
OctoberCMS Issue: https://github.com/octobercms/october/issues/5768
Related forum post
If you need an example or help with a specific field name or model, reply with your details!