├── src └── WYSIWYGTextEditor │ ├── _Imports.razor │ ├── icon.png │ ├── wwwroot │ ├── QuillLogo.png │ ├── BlazorQuill.js │ └── quill-blot-formatter.min.js │ ├── Internal │ ├── ToolbarContentComp.razor.cs │ └── ToolbarContentComp.razor │ ├── WYSIWYGTextEditor.csproj │ ├── Toolbar.cs │ ├── TextEditor.razor │ └── Interop.cs ├── Screenshot.png ├── samples ├── BlazorServerSide │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── images │ │ │ └── BlazorHelpWebsite.gif │ │ └── css │ │ │ ├── open-iconic │ │ │ ├── font │ │ │ │ ├── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ │ └── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── FONT-LICENSE │ │ │ └── site.css │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── BlazorServerSide.csproj │ ├── Pages │ │ ├── Counter.razor │ │ ├── Error.razor │ │ ├── Index.razor │ │ └── _Host.cshtml │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── _Imports.razor │ ├── App.razor │ ├── Program.cs │ └── Startup.cs └── BlazorClientSide │ ├── wwwroot │ ├── images │ │ └── BlazorHelpWebsite.gif │ ├── css │ │ ├── open-iconic │ │ │ ├── font │ │ │ │ ├── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ ├── open-iconic.woff │ │ │ │ │ └── open-iconic.svg │ │ │ │ └── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── FONT-LICENSE │ │ └── site.css │ └── index.html │ ├── _Imports.razor │ ├── Pages │ ├── Counter.razor │ └── Index.razor │ ├── Shared │ ├── MainLayout.razor │ ├── SurveyPrompt.razor │ └── NavMenu.razor │ ├── App.razor │ ├── Startup.cs │ ├── Program.cs │ └── BlazorClientSide.csproj ├── azure-pipelines.yml ├── LICENSE ├── .gitattributes ├── WYSIWYGTextEditor.sln ├── README.md └── .gitignore /src/WYSIWYGTextEditor/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.JSInterop -------------------------------------------------------------------------------- /Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/Screenshot.png -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/src/WYSIWYGTextEditor/icon.png -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/wwwroot/QuillLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/src/WYSIWYGTextEditor/wwwroot/QuillLogo.png -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/images/BlazorHelpWebsite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorClientSide/wwwroot/images/BlazorHelpWebsite.gif -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/images/BlazorHelpWebsite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/images/BlazorHelpWebsite.gif -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/somegenericdev/WYSIWYGTextEditor/HEAD/samples/BlazorServerSide/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /samples/BlazorServerSide/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.AspNetCore.Components.Web 5 | @using Microsoft.JSInterop 6 | @using BlazorClientSide 7 | @using BlazorClientSide.Shared 8 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/BlazorServerSide.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorServerSide 9 | @using BlazorServerSide.Shared 10 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/Internal/ToolbarContentComp.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace WYSIWYGTextEditor.Internal 7 | { 8 | public partial class ToolbarContentComp 9 | { 10 | [CascadingParameter] public Toolbar Toolbar { get; set; } 11 | [CascadingParameter] public List Fonts { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Builder; 2 | using Microsoft.Extensions.DependencyInjection; 3 | 4 | namespace BlazorClientSide 5 | { 6 | public class Startup 7 | { 8 | public void ConfigureServices(IServiceCollection services) 9 | { 10 | } 11 | 12 | public void Configure(IComponentsApplicationBuilder app) 13 | { 14 | app.AddComponent("app"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Blazor.Hosting; 2 | 3 | namespace BlazorClientSide 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | CreateHostBuilder(args).Build().Run(); 10 | } 11 | 12 | public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => 13 | BlazorWebAssemblyHost.CreateDefaultBuilder() 14 | .UseBlazorStartup(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 | 11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] public string Title { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /samples/BlazorServerSide/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorServerSide 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/BlazorClientSide.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - main 3 | 4 | pool: 5 | vmImage: 'vs2017-win2016' 6 | 7 | variables: 8 | buildConfiguration: 'Release' 9 | 10 | steps: 11 | - task: DotNetCoreInstaller@0 12 | displayName: 'Installing .NET Core SDK...' 13 | inputs: 14 | version: 3.0.100 15 | 16 | - task: NuGetToolInstaller@0 17 | displayName: 'Installing Nuget Tools...' 18 | inputs: 19 | versionSpec: '4.9.2' 20 | 21 | - script: dotnet build --configuration $(buildConfiguration) src/Blazored.TextEditor/Blazored.TextEditor.csproj 22 | displayName: 'Building $(buildConfiguration)...' 23 | 24 | - task: DotNetCoreCLI@2 25 | displayName: 'Generating Nuget Package... ' 26 | inputs: 27 | command: pack 28 | arguments: --no-build 29 | packagesToPack: src/Blazored.TextEditor/Blazored.TextEditor.csproj 30 | configuration: $(buildConfiguration) 31 | 32 | - task: PublishBuildArtifacts@1 33 | displayName: 'Publishing Build Artifacts...' 34 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BlazorClientSide 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Loading... 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 21 |
22 | 23 | @code { 24 | bool collapseNavMenu = true; 25 | 26 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 27 | 28 | void ToggleNavMenu() 29 | { 30 | collapseNavMenu = !collapseNavMenu; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 21 |
22 | 23 | @code { 24 | bool collapseNavMenu = true; 25 | 26 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 27 | 28 | void ToggleNavMenu() 29 | { 30 | collapseNavMenu = !collapseNavMenu; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Blazored 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using WYSIWYGTextEditor 3 | 4 | 33 | 34 | 36 | 37 | 38 | @code{ 39 | List Fonts = new List { "MSGothic", "Impact", "Courier", "Comic", "Bahnschrift" }; //be sure to set the default font as the first in the list 40 | TextEditor MyEditor; 41 | } -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /samples/BlazorServerSide/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorServerSide.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | Blazor ServerSide 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/WYSIWYGTextEditor.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 3.0 6 | WYSIWYGTextEditor 7 | 8 | WYSIWYGTextEditor 9 | 1.0.0 10 | somegenericdev, Michael Washington 11 | WYSIWYG Rich text editor for Blazor applications, forked from Blazored.TextEditor - Uses Quill JS 12 | Copyright 2019 (c) Michael Washington. All rights reserved. 13 | Copyright 2021 (c) somegenericdev. All rights reserved. 14 | MIT 15 | https://github.com/somegenericdev/TextEditor 16 | https://raw.githubusercontent.com/somegenericdev/TextEditor/main/src/WYSIWYGTextEditor/wwwroot/QuillLogo.png 17 | https://github.com/somegenericdev/TextEditor 18 | Blazor Rich Text Editor Quill QuillJS WYSIWYG Blazored Razor Components 19 | 20 | Allows images to be resized 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Components; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.AspNetCore.HttpsPolicy; 9 | using Microsoft.Extensions.Configuration; 10 | using Microsoft.Extensions.DependencyInjection; 11 | using Microsoft.Extensions.Hosting; 12 | 13 | namespace BlazorServerSide 14 | { 15 | public class Startup 16 | { 17 | public Startup(IConfiguration configuration) 18 | { 19 | Configuration = configuration; 20 | } 21 | 22 | public IConfiguration Configuration { get; } 23 | 24 | // This method gets called by the runtime. Use this method to add services to the container. 25 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 26 | public void ConfigureServices(IServiceCollection services) 27 | { 28 | services.AddRazorPages(); 29 | services.AddServerSideBlazor().AddCircuitOptions(options => { options.DetailedErrors = true; }); 30 | } 31 | 32 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 33 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 34 | { 35 | if (env.IsDevelopment()) 36 | { 37 | app.UseDeveloperExceptionPage(); 38 | } 39 | else 40 | { 41 | app.UseExceptionHandler("/Error"); 42 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 43 | app.UseHsts(); 44 | } 45 | 46 | app.UseHttpsRedirection(); 47 | app.UseStaticFiles(); 48 | 49 | app.UseRouting(); 50 | 51 | app.UseEndpoints(endpoints => 52 | { 53 | endpoints.MapBlazorHub(); 54 | endpoints.MapFallbackToPage("/_Host"); 55 | }); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/Toolbar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WYSIWYGTextEditor 6 | { 7 | public class Toolbar 8 | { 9 | private bool _showFullToolbar; 10 | 11 | public bool ShowFullToolbar 12 | { 13 | get { return _showFullToolbar; } 14 | set 15 | { 16 | _showFullToolbar = value; 17 | if (value == true) 18 | { 19 | SetAllPropertiesToTrue(); 20 | } 21 | } 22 | } 23 | 24 | public bool ShowFontControls { get; set; } = true; 25 | public bool ShowSizeControls { get; set; } 26 | public bool ShowStyleControls { get; set; } 27 | public bool ShowColorControls { get; set; } 28 | public bool ShowHeaderControls { get; set; } 29 | public bool ShowQuotationControls { get; set; } 30 | public bool ShowCodeBlockControls { get; set; } 31 | public bool ShowListControls { get; set; } 32 | public bool ShowIndentationControls { get; set; } 33 | public bool ShowAlignmentControls { get; set; } 34 | public bool ShowDirectionControls { get; set; } 35 | public bool ShowHypertextLinkControls { get; set; } 36 | public bool ShowInsertImageControls { get; set; } 37 | public bool ShowEmbedVideoControls { get; set; } 38 | public bool ShowMathControls { get; set; } 39 | public bool ShowCleanFormattingControls { get; set; } 40 | 41 | public void SetAllPropertiesToTrue() 42 | { 43 | ShowFontControls = true; 44 | ShowSizeControls = true; 45 | ShowStyleControls = true; 46 | ShowColorControls = true; 47 | ShowHeaderControls = true; 48 | ShowQuotationControls = true; 49 | ShowCodeBlockControls = true; 50 | ShowAlignmentControls = true; 51 | ShowListControls = true; 52 | ShowIndentationControls = true; 53 | ShowDirectionControls = true; 54 | ShowHypertextLinkControls = true; 55 | ShowInsertImageControls = true; 56 | ShowEmbedVideoControls = true; 57 | ShowMathControls = true; 58 | ShowCleanFormattingControls = true; 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/wwwroot/BlazorQuill.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | window.QuillFunctions = { 3 | createQuill: function ( 4 | quillElement, toolBar, readOnly, 5 | placeholder, theme, debugLevel, customFonts) { 6 | 7 | Quill.register('modules/blotFormatter', QuillBlotFormatter.default); 8 | 9 | var options = { 10 | debug: debugLevel, 11 | modules: { 12 | toolbar: toolBar, 13 | blotFormatter: {} 14 | }, 15 | placeholder: placeholder, 16 | readOnly: readOnly, 17 | theme: theme 18 | }; 19 | 20 | if (customFonts != null) { 21 | var fontAttributor = Quill.import('formats/font'); 22 | fontAttributor.whitelist = customFonts; 23 | Quill.register(fontAttributor, true); 24 | 25 | } 26 | 27 | 28 | 29 | 30 | 31 | new Quill(quillElement, options); 32 | }, 33 | getQuillContent: function(quillElement) { 34 | return JSON.stringify(quillElement.__quill.getContents()); 35 | }, 36 | getQuillText: function(quillElement) { 37 | return quillElement.__quill.getText(); 38 | }, 39 | getQuillHTML: function(quillElement) { 40 | return quillElement.__quill.root.innerHTML; 41 | }, 42 | loadQuillContent: function(quillElement, quillContent) { 43 | content = JSON.parse(quillContent); 44 | return quillElement.__quill.setContents(content, 'api'); 45 | }, 46 | loadQuillHTMLContent: function (quillElement, quillHTMLContent) { 47 | return quillElement.__quill.root.innerHTML = quillHTMLContent; 48 | }, 49 | enableQuillEditor: function (quillElement, mode) { 50 | quillElement.__quill.enable(mode); 51 | }, 52 | insertQuillImage: function (quillElement, imageURL) { 53 | var Delta = Quill.import('delta'); 54 | editorIndex = 0; 55 | 56 | if (quillElement.__quill.getSelection() !== null) { 57 | editorIndex = quillElement.__quill.getSelection().index; 58 | } 59 | 60 | return quillElement.__quill.updateContents( 61 | new Delta() 62 | .retain(editorIndex) 63 | .insert({ image: imageURL }, 64 | { alt: imageURL })); 65 | }, 66 | }; 67 | })(); -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /WYSIWYGTextEditor.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29519.87 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServerSide", "samples\BlazorServerSide\BlazorServerSide.csproj", "{AEA7320C-E669-4009-B877-20E49D1D1687}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientSide", "samples\BlazorClientSide\BlazorClientSide.csproj", "{59EDB617-CA0F-472B-B107-A4E1694A3691}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{666C8D8F-0108-4D22-9FA8-E1C65E42B1E2}" 11 | EndProject 12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5DCD4124-DAD2-4777-92CB-16ABA93847C1}" 13 | ProjectSection(SolutionItems) = preProject 14 | DeltaExample.png = DeltaExample.png 15 | HTMLExample.png = HTMLExample.png 16 | InlineEditingExample.png = InlineEditingExample.png 17 | README.md = README.md 18 | EndProjectSection 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WYSIWYGTextEditor", "src\WYSIWYGTextEditor\WYSIWYGTextEditor.csproj", "{709BDDB9-F517-4762-89AC-4CF6C1229BEA}" 21 | EndProject 22 | Global 23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 24 | Debug|Any CPU = Debug|Any CPU 25 | Release|Any CPU = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {AEA7320C-E669-4009-B877-20E49D1D1687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {AEA7320C-E669-4009-B877-20E49D1D1687}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {AEA7320C-E669-4009-B877-20E49D1D1687}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {AEA7320C-E669-4009-B877-20E49D1D1687}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {59EDB617-CA0F-472B-B107-A4E1694A3691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {59EDB617-CA0F-472B-B107-A4E1694A3691}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {59EDB617-CA0F-472B-B107-A4E1694A3691}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {59EDB617-CA0F-472B-B107-A4E1694A3691}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {709BDDB9-F517-4762-89AC-4CF6C1229BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 37 | {709BDDB9-F517-4762-89AC-4CF6C1229BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU 38 | {709BDDB9-F517-4762-89AC-4CF6C1229BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {709BDDB9-F517-4762-89AC-4CF6C1229BEA}.Release|Any CPU.Build.0 = Release|Any CPU 40 | EndGlobalSection 41 | GlobalSection(SolutionProperties) = preSolution 42 | HideSolutionNode = FALSE 43 | EndGlobalSection 44 | GlobalSection(NestedProjects) = preSolution 45 | {AEA7320C-E669-4009-B877-20E49D1D1687} = {666C8D8F-0108-4D22-9FA8-E1C65E42B1E2} 46 | {59EDB617-CA0F-472B-B107-A4E1694A3691} = {666C8D8F-0108-4D22-9FA8-E1C65E42B1E2} 47 | EndGlobalSection 48 | GlobalSection(ExtensibilityGlobals) = postSolution 49 | SolutionGuid = {9F1B7D95-9415-4F7A-849C-FBF83101BECF} 50 | EndGlobalSection 51 | EndGlobal 52 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | app { 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | 13 | .top-row { 14 | height: 3.5rem; 15 | display: flex; 16 | align-items: center; 17 | } 18 | 19 | .main { 20 | flex: 1; 21 | } 22 | 23 | .main .top-row { 24 | background-color: #e6e6e6; 25 | border-bottom: 1px solid #d6d5d5; 26 | } 27 | 28 | .sidebar { 29 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 30 | } 31 | 32 | .sidebar .top-row { 33 | background-color: rgba(0,0,0,0.4); 34 | } 35 | 36 | .sidebar .navbar-brand { 37 | font-size: 1.1rem; 38 | } 39 | 40 | .sidebar .oi { 41 | width: 2rem; 42 | font-size: 1.1rem; 43 | vertical-align: text-top; 44 | top: -2px; 45 | } 46 | 47 | .nav-item { 48 | font-size: 0.9rem; 49 | padding-bottom: 0.5rem; 50 | } 51 | 52 | .nav-item:first-of-type { 53 | padding-top: 1rem; 54 | } 55 | 56 | .nav-item:last-of-type { 57 | padding-bottom: 1rem; 58 | } 59 | 60 | .nav-item a { 61 | color: #d7d7d7; 62 | border-radius: 4px; 63 | height: 3rem; 64 | display: flex; 65 | align-items: center; 66 | line-height: 3rem; 67 | } 68 | 69 | .nav-item a.active { 70 | background-color: rgba(255,255,255,0.25); 71 | color: white; 72 | } 73 | 74 | .nav-item a:hover { 75 | background-color: rgba(255,255,255,0.1); 76 | color: white; 77 | } 78 | 79 | .content { 80 | padding-top: 1.1rem; 81 | } 82 | 83 | .navbar-toggler { 84 | background-color: rgba(255, 255, 255, 0.1); 85 | } 86 | 87 | .valid.modified:not([type=checkbox]) { 88 | outline: 1px solid #26b050; 89 | } 90 | 91 | .invalid { 92 | outline: 1px solid red; 93 | } 94 | 95 | .validation-message { 96 | color: red; 97 | } 98 | 99 | @media (max-width: 767.98px) { 100 | .main .top-row { 101 | display: none; 102 | } 103 | } 104 | 105 | @media (min-width: 768px) { 106 | app { 107 | flex-direction: row; 108 | } 109 | 110 | .sidebar { 111 | width: 250px; 112 | height: 100vh; 113 | position: sticky; 114 | top: 0; 115 | } 116 | 117 | .main .top-row { 118 | position: sticky; 119 | top: 0; 120 | } 121 | 122 | .main > div { 123 | padding-left: 2rem !important; 124 | padding-right: 1.5rem !important; 125 | } 126 | 127 | .navbar-toggler { 128 | display: none; 129 | } 130 | 131 | .sidebar .collapse { 132 | /* Never collapse the sidebar for wide screens */ 133 | display: block; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/Internal/ToolbarContentComp.razor: -------------------------------------------------------------------------------- 1 | 27 | @if (Toolbar.ShowSizeControls) 28 | { 29 | 35 | } 36 | @if (Toolbar.ShowStyleControls) 37 | { 38 | 39 | 40 | 41 | 42 | } 43 | @if (Toolbar.ShowColorControls) 44 | { 45 | 46 | 47 | } 48 | 49 | 50 | @if (Toolbar.ShowHeaderControls) 51 | { 52 | 53 | 54 | } 55 | @if (Toolbar.ShowQuotationControls) 56 | { 57 | 58 | } 59 | @if (Toolbar.ShowCodeBlockControls) 60 | { 61 | 62 | } 63 | @if (Toolbar.ShowListControls) 64 | { 65 | 66 | 67 | } 68 | 69 | @if (Toolbar.ShowIndentationControls) 70 | { 71 | 72 | 73 | } 74 | @if (Toolbar.ShowAlignmentControls) 75 | { 76 | 82 | } 83 | @if (Toolbar.ShowDirectionControls) 84 | { 85 | 86 | } 87 | 88 | 89 | @if (Toolbar.ShowHypertextLinkControls) 90 | { 91 | 92 | } 93 | @if (Toolbar.ShowInsertImageControls) 94 | { 95 | 96 | } 97 | @if (Toolbar.ShowEmbedVideoControls) 98 | { 99 | 100 | } 101 | @if (Toolbar.ShowMathControls) 102 | { 103 | 104 | 105 | 106 | } 107 | 108 | 109 | @if (Toolbar.ShowCleanFormattingControls) 110 | { 111 | 112 | } 113 | -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/TextEditor.razor: -------------------------------------------------------------------------------- 1 | @inject IJSRuntime JSRuntime 2 | @namespace WYSIWYGTextEditor 3 | @using WYSIWYGTextEditor.Internal 4 |
5 | @if (Toolbar != null) 6 | { 7 | 8 | 9 | 10 | 11 | 12 | 13 | } 14 | 15 | @ToolbarContent 16 |
17 |
18 | @EditorContent 19 |
20 | 21 | @code { 22 | [Parameter] 23 | public Toolbar Toolbar { get; set; } 24 | [Parameter] 25 | public List Fonts { get; set; } 26 | [Parameter] 27 | public string EditorContainerId { get; set; } 28 | [Parameter] 29 | public RenderFragment EditorContent { get; set; } 30 | 31 | [Parameter] 32 | public RenderFragment ToolbarContent { get; set; } 33 | 34 | [Parameter] 35 | public bool ReadOnly { get; set; } 36 | = false; 37 | 38 | [Parameter] 39 | public string Placeholder { get; set; } 40 | = "Compose an epic..."; 41 | 42 | [Parameter] 43 | public string Theme { get; set; } 44 | = "snow"; 45 | 46 | [Parameter] 47 | public string DebugLevel { get; set; } 48 | = "info"; 49 | 50 | private ElementReference QuillElement; 51 | private ElementReference ToolBar; 52 | 53 | protected override async Task 54 | OnAfterRenderAsync(bool firstRender) 55 | { 56 | if (firstRender) 57 | { 58 | await Interop.CreateQuill( 59 | JSRuntime, 60 | QuillElement, 61 | ToolBar, 62 | ReadOnly, 63 | Placeholder, 64 | Theme, 65 | DebugLevel, Fonts); 66 | } 67 | } 68 | 69 | public async Task GetText() 70 | { 71 | return await Interop.GetText( 72 | JSRuntime, QuillElement); 73 | } 74 | 75 | public async Task GetHTML() 76 | { 77 | return await Interop.GetHTML( 78 | JSRuntime, QuillElement); 79 | } 80 | 81 | public async Task GetContent() 82 | { 83 | return await Interop.GetContent( 84 | JSRuntime, QuillElement); 85 | } 86 | 87 | public async Task LoadContent(string Content) 88 | { 89 | var QuillDelta = 90 | await Interop.LoadQuillContent( 91 | JSRuntime, QuillElement, Content); 92 | } 93 | 94 | public async Task LoadHTMLContent(string quillHTMLContent) 95 | { 96 | var QuillDelta = 97 | await Interop.LoadQuillHTMLContent( 98 | JSRuntime, QuillElement, quillHTMLContent); 99 | } 100 | 101 | public async Task InsertImage(string ImageURL) 102 | { 103 | var QuillDelta = 104 | await Interop.InsertQuillImage( 105 | JSRuntime, QuillElement, ImageURL); 106 | } 107 | 108 | public async Task EnableEditor(bool mode) 109 | { 110 | var QuillDelta = 111 | await Interop.EnableQuillEditor( 112 | JSRuntime, QuillElement, mode); 113 | } 114 | } -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/Interop.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.JSInterop; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | 6 | namespace WYSIWYGTextEditor 7 | { 8 | public static class Interop 9 | { 10 | internal static ValueTask CreateQuill( 11 | IJSRuntime jsRuntime, 12 | ElementReference quillElement, 13 | ElementReference toolbar, 14 | bool readOnly, 15 | string placeholder, 16 | string theme, 17 | string debugLevel, 18 | List customFonts=null) 19 | { 20 | return jsRuntime.InvokeAsync( 21 | "QuillFunctions.createQuill", 22 | quillElement, toolbar, readOnly, 23 | placeholder, theme, debugLevel, customFonts); 24 | } 25 | 26 | internal static ValueTask GetText( 27 | IJSRuntime jsRuntime, 28 | ElementReference quillElement) 29 | { 30 | return jsRuntime.InvokeAsync( 31 | "QuillFunctions.getQuillText", 32 | quillElement); 33 | } 34 | 35 | internal static ValueTask GetHTML( 36 | IJSRuntime jsRuntime, 37 | ElementReference quillElement) 38 | { 39 | return jsRuntime.InvokeAsync( 40 | "QuillFunctions.getQuillHTML", 41 | quillElement); 42 | } 43 | 44 | internal static ValueTask GetContent( 45 | IJSRuntime jsRuntime, 46 | ElementReference quillElement) 47 | { 48 | return jsRuntime.InvokeAsync( 49 | "QuillFunctions.getQuillContent", 50 | quillElement); 51 | } 52 | 53 | internal static ValueTask LoadQuillContent( 54 | IJSRuntime jsRuntime, 55 | ElementReference quillElement, 56 | string Content) 57 | { 58 | return jsRuntime.InvokeAsync( 59 | "QuillFunctions.loadQuillContent", 60 | quillElement, Content); 61 | } 62 | 63 | internal static ValueTask LoadQuillHTMLContent( 64 | IJSRuntime jsRuntime, 65 | ElementReference quillElement, 66 | string quillHTMLContent) 67 | { 68 | return jsRuntime.InvokeAsync( 69 | "QuillFunctions.loadQuillHTMLContent", 70 | quillElement, quillHTMLContent); 71 | } 72 | 73 | internal static ValueTask EnableQuillEditor( 74 | IJSRuntime jsRuntime, 75 | ElementReference quillElement, 76 | bool mode) 77 | { 78 | return jsRuntime.InvokeAsync( 79 | "QuillFunctions.enableQuillEditor", 80 | quillElement, mode); 81 | } 82 | 83 | internal static ValueTask InsertQuillImage( 84 | IJSRuntime jsRuntime, 85 | ElementReference quillElement, 86 | string imageURL) 87 | { 88 | return jsRuntime.InvokeAsync( 89 | "QuillFunctions.insertQuillImage", 90 | quillElement, imageURL); 91 | } 92 | 93 | } 94 | } -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a, .main .top-row .btn-link { 40 | white-space: nowrap; 41 | margin-left: 1.5rem; 42 | } 43 | 44 | .main .top-row a:first-child { 45 | overflow: hidden; 46 | text-overflow: ellipsis; 47 | } 48 | 49 | .sidebar { 50 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 51 | } 52 | 53 | .sidebar .top-row { 54 | background-color: rgba(0,0,0,0.4); 55 | } 56 | 57 | .sidebar .navbar-brand { 58 | font-size: 1.1rem; 59 | } 60 | 61 | .sidebar .oi { 62 | width: 2rem; 63 | font-size: 1.1rem; 64 | vertical-align: text-top; 65 | top: -2px; 66 | } 67 | 68 | .sidebar .nav-item { 69 | font-size: 0.9rem; 70 | padding-bottom: 0.5rem; 71 | } 72 | 73 | .sidebar .nav-item:first-of-type { 74 | padding-top: 1rem; 75 | } 76 | 77 | .sidebar .nav-item:last-of-type { 78 | padding-bottom: 1rem; 79 | } 80 | 81 | .sidebar .nav-item a { 82 | color: #d7d7d7; 83 | border-radius: 4px; 84 | height: 3rem; 85 | display: flex; 86 | align-items: center; 87 | line-height: 3rem; 88 | } 89 | 90 | .sidebar .nav-item a.active { 91 | background-color: rgba(255,255,255,0.25); 92 | color: white; 93 | } 94 | 95 | .sidebar .nav-item a:hover { 96 | background-color: rgba(255,255,255,0.1); 97 | color: white; 98 | } 99 | 100 | .content { 101 | padding-top: 1.1rem; 102 | } 103 | 104 | .navbar-toggler { 105 | background-color: rgba(255, 255, 255, 0.1); 106 | } 107 | 108 | .valid.modified:not([type=checkbox]) { 109 | outline: 1px solid #26b050; 110 | } 111 | 112 | .invalid { 113 | outline: 1px solid red; 114 | } 115 | 116 | .validation-message { 117 | color: red; 118 | } 119 | 120 | #blazor-error-ui { 121 | background: lightyellow; 122 | bottom: 0; 123 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 124 | display: none; 125 | left: 0; 126 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 127 | position: fixed; 128 | width: 100%; 129 | z-index: 1000; 130 | } 131 | 132 | #blazor-error-ui .dismiss { 133 | cursor: pointer; 134 | position: absolute; 135 | right: 0.75rem; 136 | top: 0.5rem; 137 | } 138 | 139 | @media (max-width: 767.98px) { 140 | .main .top-row:not(.auth) { 141 | display: none; 142 | } 143 | 144 | .main .top-row.auth { 145 | justify-content: space-between; 146 | } 147 | 148 | .main .top-row a, .main .top-row .btn-link { 149 | margin-left: 0; 150 | } 151 | } 152 | 153 | @media (min-width: 768px) { 154 | app { 155 | flex-direction: row; 156 | } 157 | 158 | .sidebar { 159 | width: 250px; 160 | height: 100vh; 161 | position: sticky; 162 | top: 0; 163 | } 164 | 165 | .main .top-row { 166 | position: sticky; 167 | top: 0; 168 | } 169 | 170 | .main > div { 171 | padding-left: 2rem !important; 172 | padding-right: 1.5rem !important; 173 | } 174 | 175 | .navbar-toggler { 176 | display: none; 177 | } 178 | 179 | .sidebar .collapse { 180 | /* Never collapse the sidebar for wide screens */ 181 | display: block; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blazored TextEditor 2 | WYSIWYG Rich Text Editor for Blazor applications - Uses [Quill JS](https://quilljs.com/ "Quill JS.com") and was forked from [Blazored.TextEditor](https://github.com/Blazored/TextEditor) 3 | 4 | ![Screenshot](Screenshot.png) 5 | 6 | 7 | ### Installing 8 | 9 | You can install from NuGet using the following command: 10 | 11 | `Install-Package WYSIWYGTextEditor` 12 | 13 | Or via the Visual Studio package manger. 14 | 15 | ### Setup 16 | Add the following CSS files to `_Host.cshtml` if you're using Blazor Server or to `index.html` if you're using Blazor WebAssembly 17 | 18 | ```html 19 | 20 | 21 | ``` 22 | And then do the same with the Javascript files 23 | 24 | ```html 25 | 26 | 27 | 28 | ``` 29 | 30 | Add the following using statement to `_Imports.razor`. 31 | 32 | ```cs 33 | @using WYSIWYGTextEditor 34 | ``` 35 | 36 | ## Usage 37 | 38 | ### Basic Example 39 | Compared to the original project, this fork implements a much simpler way to use the component. 40 | 41 | ```cs 42 | @using WYSIWYGTextEditor 43 | 45 | 46 | @code { 47 | TextEditor MyEditor; 48 | } 49 | 50 | ``` 51 | 52 | However, should you wish to for some reason, you can still use the component in the old, more verbose way. 53 | 54 | ```cs 55 | @using WYSIWYGTextEditor 56 | 57 | 58 | 59 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |

This Toolbar works with HTML

87 | 88 | BlazorHelpWebsite.com 89 |
90 |
91 |
92 | 94 | 96 |
97 |
98 |
99 | @((MarkupString)QuillHTMLContent) 100 | @QuillHTMLContent 101 |
102 |
103 | 104 | @code { 105 | 106 | TextEditor QuillHtml; 107 | string QuillHTMLContent; 108 | 109 | public async void GetHTML() 110 | { 111 | QuillHTMLContent = await this.QuillHtml.GetHTML(); 112 | StateHasChanged(); 113 | } 114 | 115 | public async void SetHTML() 116 | { 117 | string QuillContent = 118 | @"" + 119 | ""; 120 | 121 | await this.QuillHtml.LoadHTMLContent(QuillContent); 122 | StateHasChanged(); 123 | } 124 | } 125 | ``` 126 | 127 | ### Add fonts 128 | This fork also implements a simple way to add your own fonts to the editor. 129 | 130 | ```cs 131 | @using WYSIWYGTextEditor 132 | 133 | 162 | 163 | 165 | 166 | 167 | @code{ 168 | List Fonts = new List { "MSGothic", "Impact", "Courier", "Comic", "Bahnschrift" }; //be sure to set the default font as the first in the list 169 | TextEditor MyEditor; 170 | } 171 | 172 | ``` 173 | 174 | ### Import/Export in docx 175 | Coming soon 176 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using WYSIWYGTextEditor 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |

This Toolbar works with HTML

34 | 35 | BlazorHelpWebsite.com 36 | 37 |
38 |
39 |
40 | 44 | 48 |
49 |
50 |
51 | @((MarkupString)QuillHTMLContent) 52 | @QuillHTMLContent 53 |
54 |
55 | 57 | 58 | 59 | 64 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 | 103 | 107 | 111 |
112 |
113 |
114 | @QuillContent 115 |
116 |
117 |
118 | 119 | 120 | 124 | 125 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | @((MarkupString)@QuillReadOnlyContent) 153 | 154 | 155 |
156 | 160 | 161 | @code { 162 | TextEditor QuillHtml; 163 | TextEditor QuillNative; 164 | TextEditor QuillReadOnly; 165 | 166 | string QuillHTMLContent; 167 | string QuillContent; 168 | string QuillReadOnlyContent = 169 | @"Read Only Content"; 170 | 171 | bool mode = false; 172 | 173 | public async void GetHTML() 174 | { 175 | QuillHTMLContent = await this.QuillHtml.GetHTML(); 176 | StateHasChanged(); 177 | } 178 | 179 | public async void SetHTML() 180 | { 181 | string QuillContent = 182 | @"" + 183 | ""; 184 | 185 | await this.QuillHtml.LoadHTMLContent(QuillContent); 186 | StateHasChanged(); 187 | } 188 | 189 | public async void GetContent() 190 | { 191 | QuillContent = await this.QuillNative.GetContent(); 192 | StateHasChanged(); 193 | } 194 | public async void LoadContent() 195 | { 196 | await this.QuillNative.LoadContent(QuillContent); 197 | StateHasChanged(); 198 | } 199 | public async void InsertImage() 200 | { 201 | await this.QuillNative.InsertImage("images/BlazorHelpWebsite.gif"); 202 | StateHasChanged(); 203 | } 204 | async Task ToggleQuillEditor() 205 | { 206 | mode = (mode) ? false : true; 207 | await this.QuillReadOnly.EnableEditor(mode); 208 | } 209 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /samples/BlazorServerSide/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /src/WYSIWYGTextEditor/wwwroot/quill-blot-formatter.min.js: -------------------------------------------------------------------------------- 1 | !function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t(require("Quill")) : "function" == typeof define && define.amd ? define(["Quill"], t) : "object" == typeof exports ? exports.QuillBlotFormatter = t(require("Quill")) : e.QuillBlotFormatter = t(e.Quill) }(this, function (e) { return function (e) { function t(r) { if (n[r]) return n[r].exports; var o = n[r] = { i: r, l: !1, exports: {} }; return e[r].call(o.exports, o, o.exports, t), o.l = !0, o.exports } var n = {}; return t.m = e, t.c = n, t.d = function (e, n, r) { t.o(e, n) || Object.defineProperty(e, n, { configurable: !1, enumerable: !0, get: r }) }, t.n = function (e) { var n = e && e.__esModule ? function () { return e.default } : function () { return e }; return t.d(n, "a", n), n }, t.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, t.p = "", t(t.s = 14) }([function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var i = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), a = n(15), l = r(a), u = n(4), s = r(u), c = n(1), f = (r(c), n(2)), p = (r(f), function (e, t) { return t }), d = function () { function e(t) { var n = this, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; o(this, e), this.onClick = function () { n.hide() }, this.quill = t, this.options = (0, l.default)(s.default, r, { arrayMerge: p }), this.currentSpec = null, this.actions = [], this.overlay = document.createElement("div"), this.overlay.classList.add(this.options.overlay.className), this.options.overlay.style && Object.assign(this.overlay.style, this.options.overlay.style), document.execCommand("enableObjectResizing", !1, "false"), this.quill.root.parentNode.style.position = this.quill.root.parentNode.style.position || "relative", this.quill.root.addEventListener("click", this.onClick), this.specs = this.options.specs.map(function (e) { return new e(n) }), this.specs.forEach(function (e) { return e.init() }) } return i(e, [{ key: "show", value: function (e) { this.currentSpec = e, this.currentSpec.setSelection(), this.setUserSelect("none"), this.quill.root.parentNode.appendChild(this.overlay), this.repositionOverlay(), this.createActions(e) } }, { key: "hide", value: function () { this.currentSpec && (this.currentSpec.onHide(), this.currentSpec = null, this.quill.root.parentNode.removeChild(this.overlay), this.overlay.style.setProperty("display", "none"), this.setUserSelect(""), this.destroyActions()) } }, { key: "update", value: function () { this.repositionOverlay(), this.actions.forEach(function (e) { return e.onUpdate() }) } }, { key: "createActions", value: function (e) { var t = this; this.actions = e.getActions().map(function (e) { var n = new e(t); return n.onCreate(), n }) } }, { key: "destroyActions", value: function () { this.actions.forEach(function (e) { return e.onDestroy() }), this.actions = [] } }, { key: "repositionOverlay", value: function () { if (this.currentSpec) { var e = this.currentSpec.getOverlayElement(); if (e) { var t = this.quill.root.parentNode, n = e.getBoundingClientRect(), r = t.getBoundingClientRect(); Object.assign(this.overlay.style, { display: "block", left: n.left - r.left - 1 + t.scrollLeft + "px", top: n.top - r.top + t.scrollTop + "px", width: n.width + "px", height: n.height + "px" }) } } } }, { key: "setUserSelect", value: function (e) { var t = this;["userSelect", "mozUserSelect", "webkitUserSelect", "msUserSelect"].forEach(function (n) { t.quill.root.style.setProperty(n, e), document.documentElement && document.documentElement.style.setProperty(n, e) }) } }]), e }(); t.default = d }, function (e, t, n) { "use strict"; function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), i = n(0), a = (function (e) { e && e.__esModule }(i), function () { function e(t) { r(this, e), this.formatter = t } return o(e, [{ key: "onCreate", value: function () { } }, { key: "onDestroy", value: function () { } }, { key: "onUpdate", value: function () { } }]), e }()); t.default = a }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var i = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), a = n(0), l = (r(a), n(1)), u = (r(l), n(5)), s = r(u), c = n(9), f = r(c), p = n(10), d = r(p), y = function () { function e(t) { o(this, e), this.formatter = t } return i(e, [{ key: "init", value: function () { } }, { key: "getActions", value: function () { return [s.default, f.default, d.default] } }, { key: "getTargetElement", value: function () { return null } }, { key: "getOverlayElement", value: function () { return this.getTargetElement() } }, { key: "setSelection", value: function () { this.formatter.quill.setSelection(null) } }, { key: "onHide", value: function () { } }]), e }(); t.default = y }, function (e, t, n) { "use strict" }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } Object.defineProperty(t, "__esModule", { value: !0 }); var o = n(2), i = (r(o), n(11)), a = r(i), l = n(12), u = r(l), s = { specs: [a.default, u.default], overlay: { className: "blot-formatter__overlay", style: { position: "absolute", boxSizing: "border-box", border: "1px dashed #444" } }, align: { attribute: "data-align", aligner: { applyStyle: !0 }, icons: { left: '\n \n \n \n \n \n ', center: '\n \n \n \n \n \n ', right: '\n \n \n \n \n \n ' }, toolbar: { allowDeselect: !0, mainClassName: "blot-formatter__toolbar", mainStyle: { position: "absolute", top: "-12px", right: "0", left: "0", height: "0", minWidth: "100px", font: "12px/1.0 Arial, Helvetica, sans-serif", textAlign: "center", color: "#333", boxSizing: "border-box", cursor: "default", zIndex: "1" }, buttonClassName: "blot-formatter__toolbar-button", addButtonSelectStyle: !0, buttonStyle: { display: "inline-block", width: "24px", height: "24px", background: "white", border: "1px solid #999", verticalAlign: "middle" }, svgStyle: { display: "inline-block", width: "24px", height: "24px", background: "white", border: "1px solid #999", verticalAlign: "middle" } } }, resize: { handleClassName: "blot-formatter__resize-handle", handleStyle: { position: "absolute", height: "12px", width: "12px", backgroundColor: "white", border: "1px solid #777", boxSizing: "border-box", opacity: "0.80" } } }; t.default = s }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), u = n(1), s = r(u), c = n(0), f = (r(c), n(6)), p = r(f), d = (n(3), n(7), n(8)), y = r(d), h = function (e) { function t(e) { o(this, t); var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return n.aligner = new p.default(e.options.align), n.toolbar = new y.default, n } return a(t, e), l(t, [{ key: "onCreate", value: function () { var e = this.toolbar.create(this.formatter, this.aligner); this.formatter.overlay.appendChild(e) } }, { key: "onDestroy", value: function () { var e = this.toolbar.getElement(); e && (this.formatter.overlay.removeChild(e), this.toolbar.destroy()) } }]), t }(s.default); t.default = h }, function (e, t, n) { "use strict"; function r(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var i = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), a = (n(3), "left"), l = "center", u = "right", s = function () { function e(t) { var n, i = this; o(this, e), this.applyStyle = t.aligner.applyStyle, this.alignAttribute = t.attribute, this.alignments = (n = {}, r(n, a, { name: a, icon: t.icons.left, apply: function (e) { i.setAlignment(e, a), i.setStyle(e, "inline", "left", "0 1em 1em 0") } }), r(n, l, { name: l, icon: t.icons.center, apply: function (e) { i.setAlignment(e, l), i.setStyle(e, "block", null, "auto") } }), r(n, u, { name: u, icon: t.icons.right, apply: function (e) { i.setAlignment(e, u), i.setStyle(e, "inline", "right", "0 0 1em 1em") } }), n) } return i(e, [{ key: "getAlignments", value: function () { var e = this; return Object.keys(this.alignments).map(function (t) { return e.alignments[t] }) } }, { key: "clear", value: function (e) { e.removeAttribute(this.alignAttribute), this.setStyle(e, null, null, null) } }, { key: "isAligned", value: function (e, t) { return e.getAttribute(this.alignAttribute) === t.name } }, { key: "setAlignment", value: function (e, t) { e.setAttribute(this.alignAttribute, t) } }, { key: "setStyle", value: function (e, t, n, r) { this.applyStyle && (e.style.setProperty("display", t), e.style.setProperty("float", n), e.style.setProperty("margin", r)) } }]), e }(); t.default = s }, function (e, t, n) { "use strict"; var r = (n(3), n(0)); !function (e) { e && e.__esModule }(r) }, function (e, t, n) { "use strict"; function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), i = (n(7), n(3), n(0)), a = (function (e) { e && e.__esModule }(i), function () { function e() { r(this, e), this.toolbar = null, this.buttons = [] } return o(e, [{ key: "create", value: function (e, t) { var n = document.createElement("div"); return n.classList.add(e.options.align.toolbar.mainClassName), this.addToolbarStyle(e, n), this.addButtons(e, n, t), this.toolbar = n, this.toolbar } }, { key: "destroy", value: function () { this.toolbar = null, this.buttons = [] } }, { key: "getElement", value: function () { return this.toolbar } }, { key: "addToolbarStyle", value: function (e, t) { e.options.align.toolbar.mainStyle && Object.assign(t.style, e.options.align.toolbar.mainStyle) } }, { key: "addButtonStyle", value: function (e, t, n) { n.options.align.toolbar.buttonStyle && (Object.assign(e.style, n.options.align.toolbar.buttonStyle), t > 0 && (e.style.borderLeftWidth = "0")), n.options.align.toolbar.svgStyle && Object.assign(e.children[0].style, n.options.align.toolbar.svgStyle) } }, { key: "addButtons", value: function (e, t, n) { var r = this; n.getAlignments().forEach(function (o, i) { var a = document.createElement("span"); a.classList.add(e.options.align.toolbar.buttonClassName), a.innerHTML = o.icon, a.addEventListener("click", function () { r.onButtonClick(a, e, o, n) }), r.preselectButton(a, o, e, n), r.addButtonStyle(a, i, e), r.buttons.push(a), t.appendChild(a) }) } }, { key: "preselectButton", value: function (e, t, n, r) { if (n.currentSpec) { var o = n.currentSpec.getTargetElement(); o && r.isAligned(o, t) && this.selectButton(n, e) } } }, { key: "onButtonClick", value: function (e, t, n, r) { if (t.currentSpec) { var o = t.currentSpec.getTargetElement(); o && this.clickButton(e, o, t, n, r) } } }, { key: "clickButton", value: function (e, t, n, r, o) { var i = this; this.buttons.forEach(function (e) { i.deselectButton(n, e) }), o.isAligned(t, r) ? n.options.align.toolbar.allowDeselect ? o.clear(t) : this.selectButton(n, e) : (this.selectButton(n, e), r.apply(t)), n.update() } }, { key: "selectButton", value: function (e, t) { t.classList.add("is-selected"), e.options.align.toolbar.addButtonSelectStyle && t.style.setProperty("filter", "invert(20%)") } }, { key: "deselectButton", value: function (e, t) { t.classList.remove("is-selected"), e.options.align.toolbar.addButtonSelectStyle && t.style.removeProperty("filter") } }]), e }()); t.default = a }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), u = n(1), s = r(u), c = n(0), f = (r(c), function (e) { function t(e) { o(this, t); var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return n.onMouseDown = function (e) { if (e.target instanceof HTMLElement && (n.dragHandle = e.target, n.setCursor(n.dragHandle.style.cursor), n.formatter.currentSpec)) { var t = n.formatter.currentSpec.getTargetElement(); if (t) { var r = t.getBoundingClientRect(); n.dragStartX = e.clientX, n.preDragWidth = r.width, n.targetRatio = r.height / r.width, document.addEventListener("mousemove", n.onDrag), document.addEventListener("mouseup", n.onMouseUp) } } }, n.onDrag = function (e) { if (n.formatter.currentSpec) { var t = n.formatter.currentSpec.getTargetElement(); if (t) { var r = e.clientX - n.dragStartX, o = 0; o = n.dragHandle === n.topLeftHandle || n.dragHandle === n.bottomLeftHandle ? Math.round(n.preDragWidth - r) : Math.round(n.preDragWidth + r); var i = n.targetRatio * o; t.setAttribute("width", "" + o), t.setAttribute("height", "" + i), n.formatter.update() } } }, n.onMouseUp = function () { n.setCursor(""), document.removeEventListener("mousemove", n.onDrag), document.removeEventListener("mouseup", n.onMouseUp) }, n.topLeftHandle = n.createHandle("top-left", "nwse-resize"), n.topRightHandle = n.createHandle("top-right", "nesw-resize"), n.bottomRightHandle = n.createHandle("bottom-right", "nwse-resize"), n.bottomLeftHandle = n.createHandle("bottom-left", "nesw-resize"), n.dragHandle = null, n.dragStartX = 0, n.preDragWidth = 0, n.targetRatio = 0, n } return a(t, e), l(t, [{ key: "onCreate", value: function () { this.formatter.overlay.appendChild(this.topLeftHandle), this.formatter.overlay.appendChild(this.topRightHandle), this.formatter.overlay.appendChild(this.bottomRightHandle), this.formatter.overlay.appendChild(this.bottomLeftHandle), this.repositionHandles(this.formatter.options.resize.handleStyle) } }, { key: "onDestroy", value: function () { this.setCursor(""), this.formatter.overlay.removeChild(this.topLeftHandle), this.formatter.overlay.removeChild(this.topRightHandle), this.formatter.overlay.removeChild(this.bottomRightHandle), this.formatter.overlay.removeChild(this.bottomLeftHandle) } }, { key: "createHandle", value: function (e, t) { var n = document.createElement("div"); return n.classList.add(this.formatter.options.resize.handleClassName), n.setAttribute("data-position", e), n.style.cursor = t, this.formatter.options.resize.handleStyle && Object.assign(n.style, this.formatter.options.resize.handleStyle), n.addEventListener("mousedown", this.onMouseDown), n } }, { key: "repositionHandles", value: function (e) { var t = "0px", n = "0px"; e && (e.width && (t = -parseFloat(e.width) / 2 + "px"), e.height && (n = -parseFloat(e.height) / 2 + "px")), Object.assign(this.topLeftHandle.style, { left: t, top: n }), Object.assign(this.topRightHandle.style, { right: t, top: n }), Object.assign(this.bottomRightHandle.style, { right: t, bottom: n }), Object.assign(this.bottomLeftHandle.style, { left: t, bottom: n }) } }, { key: "setCursor", value: function (e) { if (document.body && (document.body.style.cursor = e), this.formatter.currentSpec) { var t = this.formatter.currentSpec.getOverlayElement(); t && (t.style.cursor = e) } } }]), t }(s.default)); t.default = f }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), u = n(16), s = r(u), c = n(1), f = r(c), p = function (e) { function t() { var e, n, r, a; o(this, t); for (var l = arguments.length, u = Array(l), c = 0; c < l; c++)u[c] = arguments[c]; return n = r = i(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(u))), r.onKeyUp = function (e) { if (r.formatter.currentSpec && (46 === e.keyCode || 8 === e.keyCode)) { var t = s.default.find(r.formatter.currentSpec.getTargetElement()); t && t.deleteAt(0), r.formatter.hide() } }, a = n, i(r, a) } return a(t, e), l(t, [{ key: "onCreate", value: function () { document.addEventListener("keyup", this.onKeyUp, !0), this.formatter.quill.root.addEventListener("input", this.onKeyUp, !0) } }, { key: "onDestroy", value: function () { document.removeEventListener("keyup", this.onKeyUp), this.formatter.quill.root.removeEventListener("input", this.onKeyUp) } }]), t }(f.default); t.default = p }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), u = n(2), s = r(u), c = n(0), f = (r(c), function (e) { function t(e) { o(this, t); var n = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return n.onClick = function (e) { var t = e.target; t instanceof HTMLElement && "IMG" === t.tagName && (n.img = t, n.formatter.show(n)) }, n.img = null, n } return a(t, e), l(t, [{ key: "init", value: function () { this.formatter.quill.root.addEventListener("click", this.onClick) } }, { key: "getTargetElement", value: function () { return this.img } }, { key: "onHide", value: function () { this.img = null } }]), t }(s.default)); t.default = f }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = n(13), u = r(l), s = n(0), c = (r(s), function (e) { function t(e) { return o(this, t), i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, "iframe.ql-video")) } return a(t, e), t }(u.default)); t.default = c }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function a(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } Object.defineProperty(t, "__esModule", { value: !0 }); var l = function () { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function (t, n, r) { return n && e(t.prototype, n), r && e(t, r), t } }(), u = n(2), s = r(u), c = n(0), f = (r(c), "data-blot-formatter-unclickable-bound"), p = function (e) { function t(e, n) { o(this, t); var r = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.onTextChange = function () { Array.from(document.querySelectorAll(r.selector + ":not([" + f + "])")).forEach(function (e) { e.setAttribute(f, "true"), e.addEventListener("mouseenter", r.onMouseEnter) }) }, r.onMouseEnter = function (e) { var t = e.target; t instanceof HTMLElement && (r.nextUnclickable = t, r.repositionProxyImage(r.nextUnclickable)) }, r.onProxyImageClick = function () { r.unclickable = r.nextUnclickable, r.nextUnclickable = null, r.formatter.show(r), r.hideProxyImage() }, r.selector = n, r.unclickable = null, r.nextUnclickable = null, r } return a(t, e), l(t, [{ key: "init", value: function () { document.body && document.body.appendChild(this.createProxyImage()), this.hideProxyImage(), this.proxyImage.addEventListener("click", this.onProxyImageClick), this.formatter.quill.on("text-change", this.onTextChange) } }, { key: "getTargetElement", value: function () { return this.unclickable } }, { key: "getOverlayElement", value: function () { return this.unclickable } }, { key: "onHide", value: function () { this.hideProxyImage(), this.nextUnclickable = null, this.unclickable = null } }, { key: "createProxyImage", value: function () { var e = document.createElement("canvas"), t = e.getContext("2d"); return t.globalAlpha = 0, t.fillRect(0, 0, 1, 1), this.proxyImage = document.createElement("img"), this.proxyImage.src = e.toDataURL("image/png"), this.proxyImage.classList.add("blot-formatter__proxy-image"), Object.assign(this.proxyImage.style, { position: "absolute", margin: "0" }), this.proxyImage } }, { key: "hideProxyImage", value: function () { Object.assign(this.proxyImage.style, { display: "none" }) } }, { key: "repositionProxyImage", value: function (e) { var t = e.getBoundingClientRect(); Object.assign(this.proxyImage.style, { display: "block", left: t.left + window.pageXOffset + "px", top: t.top + window.pageYOffset + "px", width: t.width + "px", height: t.height + "px" }) } }]), t }(s.default); t.default = p }, function (e, t, n) { "use strict"; function r(e) { return e && e.__esModule ? e : { default: e } } Object.defineProperty(t, "__esModule", { value: !0 }); var o = n(4); Object.defineProperty(t, "DefaultOptions", { enumerable: !0, get: function () { return r(o).default } }); var i = n(0); Object.defineProperty(t, "default", { enumerable: !0, get: function () { return r(i).default } }); var a = n(1); Object.defineProperty(t, "Action", { enumerable: !0, get: function () { return r(a).default } }); var l = n(5); Object.defineProperty(t, "AlignAction", { enumerable: !0, get: function () { return r(l).default } }); var u = n(6); Object.defineProperty(t, "DefaultAligner", { enumerable: !0, get: function () { return r(u).default } }); var s = n(8); Object.defineProperty(t, "DefaultToolbar", { enumerable: !0, get: function () { return r(s).default } }); var c = n(10); Object.defineProperty(t, "DeleteAction", { enumerable: !0, get: function () { return r(c).default } }); var f = n(9); Object.defineProperty(t, "ResizeAction", { enumerable: !0, get: function () { return r(f).default } }); var p = n(2); Object.defineProperty(t, "BlotSpec", { enumerable: !0, get: function () { return r(p).default } }); var d = n(11); Object.defineProperty(t, "ImageSpec", { enumerable: !0, get: function () { return r(d).default } }); var y = n(13); Object.defineProperty(t, "UnclickableBlotSpec", { enumerable: !0, get: function () { return r(y).default } }); var h = n(12); Object.defineProperty(t, "IframeVideoSpec", { enumerable: !0, get: function () { return r(h).default } }) }, function (e, t, n) { "use strict"; function r(e) { return !!e && "object" == typeof e } function o(e) { var t = Object.prototype.toString.call(e); return "[object RegExp]" === t || "[object Date]" === t || i(e) } function i(e) { return e.$$typeof === d } function a(e) { return Array.isArray(e) ? [] : {} } function l(e, t) { return t && !1 === t.clone || !f(e) ? e : c(a(e), e, t) } function u(e, t, n) { return e.concat(t).map(function (e) { return l(e, n) }) } function s(e, t, n) { var r = {}; return f(e) && Object.keys(e).forEach(function (t) { r[t] = l(e[t], n) }), Object.keys(t).forEach(function (o) { f(t[o]) && e[o] ? r[o] = c(e[o], t[o], n) : r[o] = l(t[o], n) }), r } function c(e, t, n) { var r = Array.isArray(t), o = Array.isArray(e), i = n || { arrayMerge: u }; if (r === o) return r ? (i.arrayMerge || u)(e, t, n) : s(e, t, n); return l(t, n) } Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (e) { return r(e) && !o(e) }, p = "function" == typeof Symbol && Symbol.for, d = p ? Symbol.for("react.element") : 60103; c.all = function (e, t) { if (!Array.isArray(e)) throw new Error("first argument should be an array"); return e.reduce(function (e, n) { return c(e, n, t) }, {}) }; var y = c; t.default = y }, function (t, n) { t.exports = e }]) }); -------------------------------------------------------------------------------- /samples/BlazorClientSide/wwwroot/css/open-iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | --------------------------------------------------------------------------------