Skip to content

v0.2.0-preview

Pre-release
Pre-release

Choose a tag to compare

@gerfen gerfen released this 07 Feb 22:12
· 34 commits to master since this release

MonacoMarkdownEditor 0.2.0‑preview — Release Notes

This release introduces a more coherent public API surface, a unified configuration model, and a cleaner initialization pipeline. Because these improvements strengthen long‑term maintainability and developer experience, several breaking changes were made while still in preview.


🚨 Breaking Changes

1. New MonacoOptions configuration model

Monaco configuration is now provided through a strongly‑typed options object:

[Parameter]
public MonacoOptions Options { get; set; } = new();

This replaces earlier implicit or ad‑hoc Monaco configuration patterns.

Impact:
Consumers must now supply Monaco configuration through the Options parameter.


2. Lifecycle callback renames

Old Name New Name
OnBeforeMonacoCreated BeforeCreated
OnMonacoInitialized AfterInitialized

Impact:
Consumers must update parameter names in Razor components.


3. CSS IntelliSense parameter rename

The previous Css parameter (used for IntelliSense CSS input) has been renamed to:

AdditionalCss

This avoids confusion with the CSS editor component and clarifies its purpose.

Impact:
Consumers must rename Css → AdditionalCss.


4. Internal JS API changes

Two new JS functions were added:

  • monacoMarkdownEditor.enableFrontMatter
  • monacoMarkdownEditor.setOption

These support the new MonacoOptions model and front‑matter toggle.

Impact:
Consumers who override or wrap the JS module must update their custom scripts.


5. Initialization pipeline changes

The editor now applies Monaco options before calling monacoMarkdownEditor.init.

This ensures:

  • Predictable lifecycle ordering
  • Consistent editor configuration
  • Cleaner separation between configuration and initialization

Impact:
Consumers relying on the old initialization order may need to adjust custom logic.


✨ New Features

Front‑matter support (opt‑in)

Options = new MonacoOptions { EnableFrontMatter = true }

This allows the editor to recognize YAML front‑matter blocks and apply appropriate editor behavior.


Unified, Blazor‑first configuration

MonacoOptions provides a clean, discoverable configuration surface:

  • Word wrap
  • Minimap
  • Line numbers
  • Font size / font family
  • Theme
  • Front‑matter toggle

This mirrors the existing MarkdownOptions pattern.


Improved CSS IntelliSense pipeline

CSS input is now clearly separated into:

  • ExternalCss — aggregated CSS from parent components
  • AdditionalCss — CSS provided directly to this component

Both feed into the CSS class harvester for completions and hover support.


🛠 Internal Improvements

  • Reorganized parameter groups for clarity and IntelliSense readability
  • Cleaner lifecycle flow: BeforeCreated → apply options → init → AfterInitialized
  • Reduced JS surface area while improving extensibility
  • More predictable editor state transitions
  • Improved naming consistency across components

📦 Summary

0.2.0‑preview represents a significant maturation of the component’s architecture:

  • Cleaner API
  • Stronger configuration model
  • Better lifecycle semantics
  • Improved naming
  • Clearer CSS IntelliSense inputs
  • Front‑matter support
  • Minimal but meaningful JS enhancements

These changes position the library for stability as it approaches later preview versions.