@page "/creator"
@using Microsoft.AspNetCore.Authorization
@attribute [AllowAnonymous]
Kreator Treści (Zen Mode)
@if (!string.IsNullOrEmpty(_savedMarkdown))
{
}
@code {
private MarkdownEditor? _editorRef;
private string _savedMarkdown = string.Empty;
private readonly string _initialMarkdown = @"# Zen Mode Editor
Welcome to your dedicated workspace. This premium panel supports Notion-like WYSIWYG editing.
## Features:
- **Zero Distraction**: Simple elevation and border framing.
- **GFM Tables**: Consistent cell padding and hover striping.
- **Clean Code Blocks**: Pre-rendered base64 font-loaded code-preview blocks.
| Option | Active | Value |
| :--- | :---: | :--- |
| Zen Mode | Yes | High Focus |
| Responsive | Yes | 1200px Max |
| Theme Sync | Yes | Automatic |
Start writing your masterpiece...";
private async Task TriggerFetchAsync()
{
if (_editorRef is not null)
{
await _editorRef.FetchContentAsync();
}
}
private void HandleSave(string markdown)
{
_savedMarkdown = markdown;
StateHasChanged();
}
}