Skip to content

feat: configurable heading font sizes via settings.json#180

Draft
JohnMcLear with Copilot wants to merge 3 commits into
masterfrom
copilot/customize-font-sizes
Draft

feat: configurable heading font sizes via settings.json#180
JohnMcLear with Copilot wants to merge 3 commits into
masterfrom
copilot/customize-font-sizes

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown

Heading font sizes were hardcoded in a static CSS file, making customization impossible without editing files that get clobbered on plugin updates.

Approach

  • Dynamic CSS endpoint (expressCreateServer): registers GET /ep_headings2/editor.css that renders CSS from the configured font sizes at request time, replacing the static file
  • Settings relay (loadSettings): reads ep_headings2.fontSizes from settings.json via ep_plugin_helpers/settings; each heading level falls back to its original default independently
  • Export parity: stylesForExport now pulls from the same settings so exported documents match the editor
  • aceEditorCSS: updated to point at the dynamic endpoint instead of the static CSS path

Configuration

"ep_headings2": {
  "fontSizes": {
    "h1": "2em",
    "h2": "1.6em",
    "h3": "1.3em",
    "h4": "1.1em"
  }
}

Omitted keys fall back to defaults (2.5em / 1.8em / 1.5em / 1.2em). Restart required after changing settings.

Copilot AI changed the title [WIP] Add option to customize font sizes in settings feat: configurable heading font sizes via settings.json Jun 2, 2026
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.

Customize font sizes (Question/Feature Request)

2 participants