/// <summary>
        /// Adds the Blazorise RichTextEdit extension related services
        /// </summary>
        /// <param name="services"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IServiceCollection AddBlazoriseRichTextEdit(this IServiceCollection services, Action <RichTextEditOptions> options = default)
        {
            var rteOptions = new RichTextEditOptions();

            options?.Invoke(rteOptions);

            services.AddSingleton(rteOptions);
            services.AddScoped <RichTextEditJsInterop>();

            return(services);
        }
Example #2
0
 /// <summary>
 /// Creates a new RichTextEditJsInterop
 /// </summary>
 public JSRichTextEditModule(IJSRuntime jsRuntime, IVersionProvider versionProvider, RichTextEditOptions options)
     : base(jsRuntime, versionProvider)
 {
     this.options = options;
 }
 /// <summary>
 /// Creates a new RichTextEditJsInterop
 /// </summary>
 public RichTextEditJsInterop(IJSRuntime jsRuntime, RichTextEditOptions options)
 {
     this.jsRuntime = jsRuntime;
     this.options   = options;
 }