How to set the text format on a formatted text field?

Created on 7 June 2024, 17 days ago

Problem/Motivation

Hi everyone,

I'm running into an issue where ECA is sending prompts and receiving responses from OpenAI. Responses that include HTML tags such as <h2> and <p> are printed as HTML in the front-end initially until the content is re-saved manually.

Assuming this is a text format issue, I'm trying to have ECA first switch the field to Full HTML, save the content, and then parse in the HTML received from OpenAI. I've tried the "set field value" action, using the token [field_text.format] and [field_text:format], and then tried setting it to full_html but that seems to fail, although it doesn't produce an error or prevent the model from completing subsequent actions.

I've also tried to target the [field_text.value] and [field_text:value]tokens when storing the response to see if that solves the issue with the HTML being rendered un-processed. But it made no difference to targeting the [field_text] token.

I'd much appreciate any insights, I'm probably wrong by going at this the old Rules way but since the "format" variable is shown in the token browser I can't be sure.

Thanks in advance.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.1

Component

Documentation

Created by

πŸ‡ΉπŸ‡­Thailand AlfTheCat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024