Customizing

Learn how to tailor the AI Smart Text Editor’s behavior and defaults

Back to Documentation

Customizing the AI Smart Text Editor

Beyond basic integration, you can adjust editor behavior either in code or—more powerfully—through the LeapHubAI Administration Dashboard. Most teams standardize options centrally to ensure consistent UX across applications.

1. Code-Level Options

Pass these settings when calling initTextEditor or TextEditor.initialize:

  • assistantLabel: Change the AI button text (e.g., “Help me write”).
  • position: Choose the label position (bottom-right-under vs. bottom-right-hover).
  • enableDictate & dictateLabel: Turn on voice dictation and customize the mic button label.
  • serverUrlOverwrite: Point to staging or multisite endpoints.

2. Administration Dashboard

In the LeapHubAI Dashboard, navigate to Components → TextEditor Settings to:

  • Set global defaults for labels and position
  • Enable or disable voice dictation organization-wide
  • Configure access permissions and feature flags per environment
  • Override server endpoints for A/B testing

3. Advanced Customizations

  • Custom Commands: Extend lh- prefixed CSS classes to add your own toolbar actions.
  • Highlight Behavior: Tweak suggestion overlay duration and trigger thresholds via API callbacks.
  • Event Hooks: Listen for events like onSuggestionSelected or onDictateStart in your application code.