feat: 5308 add Rich Text field type for schema forms - #6777
Merged
Pyatakov merged 25 commits intoSep 11, 2026
Conversation
… compact preset editors
ihar-tsykala
marked this pull request as ready for review
August 28, 2026 09:20
…nd empty grid cells Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
ihar-tsykala
marked this pull request as draft
September 1, 2026 12:35
…d type Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
ihar-tsykala
marked this pull request as ready for review
September 9, 2026 22:38
Pyatakov
reviewed
Sep 10, 2026
Contributor
There was a problem hiding this comment.
Please, address the comments below (more details added inline).
frontend/src/app/modules/schema-engine/rich-text-editor/markdown.ts:7– escapeHtml leaves"unescaped, so a markdown link URL can inject attributes into the generated<a>indexer-frontend/src/app/components/schema-form-view/markdown-view.ts:7– Same unescaped-quote attribute injection in the indexer copy of escapeHtmlfrontend/src/app/modules/schema-engine/rich-text-editor/rich-text-editor.component.ts:474– Plain-text paste collapses every line break into a single linefrontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.html:77– getRichTextCellText parses a fresh HTMLDocument per rich-text cell on every change detection cycleinterfaces/src/helpers/schema-json.ts:187– Redundant richText special case – the loop below already resolves it
Pyatakov
requested changes
Sep 10, 2026
Pyatakov
approved these changes
Sep 11, 2026
Pyatakov
deleted the
feat/5308-enhance-guardian-UI-form-to-support-rich-text
branch
September 11, 2026 16:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Every text field in a Guardian schema was plain text. An author writing instructions into a form had no way to mark a heading, emphasise a warning, or link to an external page: everything arrived as one flat paragraph, which readers misread.
Add a Rich Text field type. In the schema it is an ordinary string field carrying
customType: 'richText', so the value stays a plain JSON string and nothing downstream needs a new data type. It is stored as Markdown, which travels safely to Hedera and stays readable on its own. A policy form shows a small editor instead of a textarea — bold, italic, both list kinds, H1–H3 and links — and the document viewer, the documents grid and the Indexer render that Markdown as formatted output, with links opening in a new tab. Pasted content is reduced to the same set, so a copy from a word processor cannot bring fonts, tables or images into a document. The type is registered in the field-type picker and the Excel dictionary, and preset values use the same editor.Underline is deliberately absent: Markdown cannot store it, and raw HTML is not mixed into the value. Nothing changes for a field without that custom type, and stored values are never rewritten.
Fixes #5308
Checklist