tinymce / tinymce-blazor

Blazor integration
MIT License
45 stars 13 forks source link

word suggestions on blazor server #79

Closed sojan1 closed 5 months ago

sojan1 commented 7 months ago

How can i have the word suggestions(autocompleter) on my razor page? can the words be loaded from API? similar to @mention , but i prefer it to trigger not from a one specific letter like '@', but should trigger it on all 26 alphabets.

@page "/newcontent"
@using TinyMCE.Blazor
<TinyMCE.Blazor.Editor ApiKey="8vh23424234234242342432423423fd4y1" JsConfSrc="newcontent" ScriptSrc="/lib/tinymce/tinymce.min.js"
                       Conf="@editorConf" />

<h3>NewContent</h3>

@code {
    private Dictionary<string, object> editorConf = new Dictionary<string, object>{
    {"toolbar", "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify" },
    {"width", 400}
  };
}
exalate-issue-sync[bot] commented 7 months ago

Internal Ref: INT-3285

spocke commented 5 months ago

This is more of a question than a feature request or bug report. But you can use the editor.ui.registry.addAutocompleter API not sure having every letter mapped to such a thing is a good idea but it is possible. I would add that to a separate JS file and load that as a plugin into tinymce there are docs on the tinymce website on this API.