RichEditor

TsgcHTMLComponent_RichEditor — render a Quill-based WYSIWYG rich text editor with a hidden input that syncs its HTML for form submission, in Delphi, C++ Builder and .NET.

TsgcHTMLComponent_RichEditor

An editor component that emits a Quill editor div, its CDN assets and an init script, plus a hidden input that mirrors the content on every change. Set the content and toolbar, then read the HTML property.

Component class

TsgcHTMLComponent_RichEditor

Renders

Quill editor + hidden form input

Languages

Delphi, C++ Builder, .NET

Create it, set the toolbar, render it

Set Name so the content posts back, choose a Toolbar and Theme, then read HTML (or drop it into a TsgcHTMLTemplate_Bootstrap page).

uses
  sgcHTML_Component_RichEditor;

var
  oEditor: TsgcHTMLComponent_RichEditor;
begin
  oEditor := TsgcHTMLComponent_RichEditor.Create(nil);
  try
    oEditor.Name := 'body';
    oEditor.Content := '<p>Hello <b>world</b></p>';
    oEditor.Placeholder := 'Write your post...';
    oEditor.Height := '300px';
    oEditor.Toolbar := rtFull;
    oEditor.Theme := reSnow;

    WebModule.Response := oEditor.HTML;   // Quill editor + hidden input
  finally
    oEditor.Free;
  end;
end;
// includes: sgcHTML_Component_RichEditor.hpp

TsgcHTMLComponent_RichEditor *oEditor = new TsgcHTMLComponent_RichEditor(NULL);
try
{
  oEditor->Name = "body";
  oEditor->Content = "<p>Hello <b>world</b></p>";
  oEditor->Placeholder = "Write your post...";
  oEditor->Height = "300px";
  oEditor->Toolbar = rtFull;
  oEditor->Theme = reSnow;

  String html = oEditor->HTML;   // Quill editor + hidden input
}
__finally
{
  delete oEditor;
}
using esegece.sgcWebSockets;

var editor = new TsgcHTMLComponent_RichEditor();
editor.Name = "body";
editor.Content = "<p>Hello <b>world</b></p>";
editor.Placeholder = "Write your post...";
editor.Height = "300px";
editor.Toolbar = TsgcHTMLRichEditorToolbar.rtFull;
editor.Theme = TsgcHTMLRichEditorTheme.reSnow;

string html = editor.HTML;   // Quill editor + hidden input

Key properties & methods

The members you reach for most often.

Content

Content seeds the editor with initial HTML; Placeholder shows hint text while empty; ReadOnly renders a non-editable view.

Toolbar

Toolbar (TsgcHTMLRichEditorToolbar) selects rtMinimal, rtBasic or rtFull to control which formatting buttons appear.

Theme

Theme (TsgcHTMLRichEditorTheme) switches between the reSnow (bordered toolbar) and reBubble (inline) Quill themes.

Form binding

Set Name to emit a hidden <input> whose value is kept in sync with the editor HTML so it posts back with the form.

Sizing

Height sets the editor body height (for example 300px); EditorID sets the element id used by the Quill init script.

Output

HTML returns the Quill CDN links, editor div, hidden input and init script; CSS supplies theme-aware styling for the page template.

Keep exploring

All sgcHTML ComponentsBrowse the full feature matrix of 60+ components.
Download Free TrialThe 30-day trial ships the 60.HTML demo projects.
PricingSingle, Team and Site licenses with full source code.

Ready to Get Started?

Download the free trial and add a rich text editor to your Delphi, C++ Builder or .NET web app.