Skip to content

Conversation

@Nicolass67
Copy link
Contributor

@Nicolass67 Nicolass67 commented Feb 13, 2026

Description

The Content field in the spectra editor info panel was always read-only because the ReactQuill component used a hardcoded readOnly prop. The callback also sent only the HTML string instead of the Quill Delta, so the host app could not save the content correctly.

Changes:

  • Use readOnly={!canChangeDescription} so the field is editable when the host (e.g. ChemSpectra/ELN) passes canChangeDescription={true} and provides onDescriptionChanged.
  • Forward all ReactQuill onChange arguments (content, delta, source, editor) so the Panel can call editor.getContents() and pass a Delta (with .ops) to the host. The content can now be saved correctly in the ELN.
  • Use optional chaining for shift.ref.label in the demo to avoid runtime errors when ref is undefined.

ref: #273

@Nicolass67 Nicolass67 force-pushed the fix/content-field-editable branch from 24468e0 to eb2b9ed Compare February 13, 2026 09:07
@PiTrem PiTrem changed the title Fix: make Content field editable in info panel fix: make Content field editable in info panel Feb 13, 2026
@PiTrem PiTrem merged commit ea314db into master Feb 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants