Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #112766
    natejacobson
    Participant

    Can Smart Editor be lazy-loaded in Blazor?

    #112773
    Markov
    Keymaster

    Hi,

    Yes, it is possible by using a conditional rendering.

    For example:

    
    @page "/editor"
    
    <h3>Smart Editor (On Demand)</h3>
    
    @if (showEditor)
    {
        <Editor Width="100%" Height="300px"></Editor>
    }
    else
    {
        <button @onclick="LoadEditor">Load Editor</button>
    }
    
    @code {
        private bool showEditor = false;
    
        private void LoadEditor()
        {
            showEditor = true;
        }
    }

    This approach loads the Smart Editor after user interaction, but note that Smart.Blazor scripts are still globally loaded.

    Best regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.