[Tracker]
Update Summary: [One-line status update for stakeholders]
Short Description: Find a frontend library to setup structured content
Check-in Date: MM/DD/YYYY
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]
Problem/Motivation
Currently we have an input in specific places like ECA, AI Agents or AI API Explorer where you can provide a structured content as a big json or yaml blob in a textarea.
Since there are very specific rules about how we can add these, and since its currently based on the documented way of doing it here: https://project.pages.drupalcode.org/ai/1.2.x/developers/testing_an_ai_p...
We can not be the only one solving this - there might be an actual frontend library for creating these, where you create the object step by step or at least in some easier way then writing JSON/YAML.
If not the OpenAI way, then standard JSON:schema way.
Proposed resolution
Take time to research possible solutions for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screenshot from 2026-02-16 14-51-48.png | 18.54 KB | marcus_johansson |
| #11 | Screenshot from 2026-02-16 14-51-36.png | 18.41 KB | marcus_johansson |
Issue fork ai-3561969
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
marcus_johansson commentedComment #3
marcus_johansson commentedComment #4
marcus_johansson commentedComment #5
marcus_johansson commentedComment #6
marcus_johansson commentedComment #7
arianraeesi commentedComment #8
marcus_johansson commentedStarted on this but got prioccupied. Seems like the simplest to maintain is a json textarea with a AI helper on top - there are no graphical elements right now.
And get #3561971: Create validator for structured content in.
Comment #9
marcus_johansson commentedComment #11
marcus_johansson commentedOk, so I have added a version using codemirror, since we have that as foundation for code blocks in mxeditor as well.
What is important with this library is:
What I have done is:
You can test it by:
cd ui/json-schema-editor && npm install && npm run buildor for a simpler test:
cd ui/json-schema-editor && npm install && npm run buildRecommended follow up issues:
Notes:
The writing of the documentation was completely AI Generated and skimmed through.
The writing of the test was AI Generated and verified by humans.
The writing of the code was AI autocompleted, but written by a human.
The modifying of the bash script and the changes to the form elements in the test module was completely human written.
Comment #12
marcus_johansson commentedComment #14
a.dmitriiev commentedThe editor works as expected. I followed the instructions from the last comment and in both places the editor appears in the form.
Comment #15
a.dmitriiev commentedUpdated js_build job to build JSON Schema Editor, so it is available in the tests.
Comment #17
a.dmitriiev commentedMerged, cherry-pick to 2.0.x is in progress
Comment #20
arianraeesi commented