Open davidmfritz opened 1 year ago
Internal Ref: INT-3238
Refer following :
private Dictionary<string, object> editorConf = new Dictionary<string, object>{
{"toolbar", "undo redo | casechange blocks | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist checklist outdent indent | removeformat | code table help"},
{"width", 800},
{"plugins","code,advlist,autolink,lists,link,image,charmap,preview,anchor,searchreplace,visualblocks,fullscreen,insertdatetime,media,table,help,wordcount"}
};
Thank you, @abhijeetgupta1988, but that doesn't solve my issue on how to define a JavaScript function in a C# string that then gets executed with this NuGet Package.
There isn't a way currently the config js JSON serialized and so you can't pass in a function reference to it.
Not sure exactly how one would solve this maybe have a list of options that are callbacks then treat strings inside them as things you resolve in the global namespace. So setting "setup: "myFunc" in the C# record would then basically do "setup: myFunc" if myFunc
is a global function if one want to hide that then one could have it be namespaced like setup: "foo.bar.baz.myFunc"
can't think of any other idea so others are welcome.
You can set things client side using the https://www.tiny.cloud/docs/tinymce/6/blazor-ref/#jsconfsrc though it really depends in what you need inside that setup function call. If it's all client side JS then the JsConfSrc should work.
Hi there,
I'd like to have an example on how to define a reference to a JavaScript function for Editor.Conf that actually gets executed when tinymceBlazorWrapper.init is run.
Can you help me with this issue?
Thank you in advance! Best regards, David