Skip to main content

Posts

Showing posts from February, 2018

Creating a rich text editor with Quill

In a recent project, I was tasked with implementing functionality into an application to allow admin users the ability to add/edit descriptions of sections of work. These sections form part of a workbook that the regular users must complete. The admin users may want to add bullet points, hyperlinks as well as bold or italic text to the aforementioned descriptions - so a simple out of the box text input would not suffice. After some research, I opted to use Quill  due to its apparently simplicity and high level of customisation. This blog post will detail the basic setup and usage of Quill, in an Aurelia web project which uses typescript. The above shows a typescript file for description rows. On this file there is a method that opens an edit modal for a description, it is this modal that uses a quill editor so that the user can edit the description. In the activate method the Quill options are set using a method located in a helper file (see below). In the openEditDescript...

Data imports with Dapper

As detailed on the  Dapper Tutorial Site , Dapper is an object relational mapper (ORM), which means it handles the mapping between the code base and the data store. The setup is simple and explained effectively on the tutorial site. Hence, this post shall not describe the setup steps for Dapper, but instead show an example of how it can be used, in the context of a data import. This example deals with the real world scenario of an application with a table of employees. The employee information that populates this table derives from a different database on the server, that is used by other applications within the hypothetical company. The importer must first get the data from the common database, then make any required calculations before finally passing data into the application database table. In addition, it must handle updates to users that have already been imported previously. I will be using the Northwind  database in this example, specifically the employees table. T...