Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

422
Views
How to get the contents of TinyMCE editor using Blazor

My goal is to set up any autosave implementation

I have a TinyMCE editor on my Blazor component and i dont know the best way to get the content from it. I can load the value from my model by using @bind-Value but am unsure of getting the updated value back.

This is my code so far

NotesPage.razor

<div class="editor" style="width: -webkit-fill-available; overflow: scroll; height: 100vh; padding: 0;">
    <Editor ApiKey='my-api-key'
            CloudChannel="5"
            Conf="@editorConf"
            @bind-Value="SelectedNote.Content" />
</div>

@code{
   private NoteDTO SelectedNote { get; set; } = new();
   private Dictionary<string, object> editorConf = new Dictionary<string, object> { { "menubar", false }, { "plugins", "link image imagetools code advlist codesample table" }, { "toolbar", "undo redo | styleselect | forecolor | bold italic | table tabledelete | alignleft aligncenter alignright alignjustify | outdent indent | link image | code codesample" }, { "table_toolbar", "tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol" } };
}

Im assuming JS Interop is the best way to implement this but im unsure as how to hook it up to respond to events ie. onkeypress, onchange....

I am using Blazor and .NET6

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!