diff --git a/src/services/AlgoliaSyncService.php b/src/services/AlgoliaSyncService.php index be45107..6ffd1d5 100644 --- a/src/services/AlgoliaSyncService.php +++ b/src/services/AlgoliaSyncService.php @@ -555,7 +555,10 @@ public function prepareAlgoliaSyncElement($element, $action = 'save', $algoliaMe $rawData = AlgoliaSync::$plugin->algoliaSyncService->getFieldData($element, $field, $fieldHandle); - if (isset($rawData['type']) && in_array($rawData['type'],$arrayFieldTypes)) { + if ($rawData instanceof \craft\ckeditor\data\FieldData) { + $recordUpdate['attributes'][$fieldName] = $rawData->getRawContent();; + } + elseif (isset($rawData['type']) && in_array($rawData['type'], $arrayFieldTypes)) { $recordUpdate['attributes'][$fieldName] = $rawData['titles']; $idsFieldName = $fieldName.'Ids'; $recordUpdate['attributes'][$idsFieldName] = $rawData['ids'];