RapidSpell Web ASP.NET and RapidSpell Web Java work using JavaScript on the client side, so the spell checker can be used with frameworks such as Angular on the front-end.
RapidSpell requires a back-end to do the spell checking, and to facilitate that we can use a basic project that exposes the RapidSpell service API.
Please download the demo solution here https://keyoti.com/downloads/RapidSpellWeb-Angular-2022.zip
In the solution you will see a front-end project that is a simple Angular template project with a textbox added and the RapidSpell scripts. There is also a back-end ASP.NET 6 project that references the RapidSpell DLLs and hosts the RapidSpell API.
Here are the important parts:
Front End:
RapidSpell scripts are in assets/Keyoti_RapidSpell_Web_Common
The scripts are imported and setup in index.html
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="assets/Keyoti_RapidSpell_Web_Common/RapidSpell-AYT.js"></script>
<script type="text/javascript">
rapidSpell.setServiceType('core');
rapidSpellExtension.serviceProxy.commonFolderUrl = "https://localhost:7038/api";
</script>
Note that https://localhost:7038 is the URL based on the port of the backend project.
There is a textbox on the main page, which as long as it has an id it will be spell checked (and all other textboxes too, unless explicitly marked otherwise).
Back End:
Besides referencing the RapidSpell DLLs all the modifications are in Program.cs |