Math Font Size Configuration Demo
⚠️ API Key Required: QuillKit requires a valid API key to function. This demo uses a demo API key. For your own projects, you'll need to obtain an API key from the QuillKit service.
Feature Overview
This demo shows how to configure a default font size for all math elements in the QuillKit using the mathFontSize option.
- Default behavior: Math elements render at the browser's default size
- With mathFontSize: All math elements render at the specified size by default
- Individual control: Users can still change font size for specific math elements using the toolbar
Without mathFontSize (Default)
With mathFontSize: '20pt'
Additional Examples
Example 1: Small Math Font (12pt)
Example 2: Large Math Font (24pt)
Example 3: Relative Size (1.5em)
Usage Instructions
- Compare the two editors at the top - notice how math equations are larger on the right
- Try inserting new LaTeX equations using the TeX button in the toolbar
- Select any math equation and change its font size individually using the Font Size dropdown
- Scroll down to see examples with different mathFontSize values
Configuration Code
To configure default math font size:
new QuillKit(textarea, {
mathSupport: true,
mathFontSize: '20pt' // Can be '12pt', '1.5em', etc.
});