Skip to content

I can't make DeltaDecorations to work in wasm app #175

@qplace1

Description

@qplace1
private string[] _decorationIds; 

async Task ApplyDecoration(StandaloneCodeEditor editor)
{
    var newDecorations = new[]
    {
        new ModelDeltaDecoration
        {
            Range = new BlazorMonaco.Range(1, 1, 2, 10),
            Options = new ModelDecorationOptions
            {
                ClassName = "yellow-decoration",
                IsWholeLine = true
            }
        }
    };

    _decorationIds = await editor.DeltaDecorations(_decorationIds, newDecorations);
}

  • DeltaDecorations return new DecorationId
  • CSS "yellow-decoration" is recognized on the page, I tested it against the text on the page
  • Editor is populated with text and line 1 and 2 have something in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions