- Advanced TypeScript Programming Projects
- Peter O'Hanlon
- 216字
- 2021-06-24 13:27:08
Creating a Markdown Editor with TypeScript
It is hard to deal with content on the internet without encountering markdown. Markdown is a simplified way to create content using plain text that is easily converted into simple HTML. In this chapter, we are going to investigate what it takes to create a parser that will convert a subset of the markup format into HTML content. We will automatically convert relevant tags into the first three header levels, the horizontal rule, and paragraphs.
By the end of this chapter, we will have covered how to create a simple Bootstrap web page and reference the JavaScript generated from our TypeScript, as well as hooking up to a simple event handler. We will also cover how to create classes using simple design patterns and how to design classes with single responsibilities, which are techniques that serve us well as professional developers.
The following topics will be covered in this chapter:
- Creating a Bootstrap page that overrides the Bootstrap styling
- Choosing which tags we are going to use in our markdown
- Defining requirements
- Mapping our markdown tag types to HTML tag types
- Storing our converted markdown in a custom class
- Using the visitor pattern to update our document
- Using the chain-of-responsibility pattern to apply tags
- Hooking this back to our HTML
- 操作系統(tǒng)實用教程(Linux版)
- Designing Purpose:Built Drones for Ardupilot Pixhawk 2.1
- 嵌入式實時操作系統(tǒng):RT-Thread設(shè)計與實現(xiàn)
- Windows 7案例教程
- AutoCAD 2014中文版從入門到精通
- Windows 8實戰(zhàn)從入門到精通(超值版)
- 從零開始學安裝與重裝系統(tǒng)
- iOS 10 開發(fā)指南
- Mastering Windows 8 C++ App Development
- Linux 從入門到項目實踐(超值版)
- Getting Started with UDK
- Implementing Cloud Design Patterns for AWS(Second Edition)
- Unity AR/VR開發(fā):實戰(zhàn)高手訓(xùn)練營
- Getting Started with Citrix XenApp 6.5
- 計算機系統(tǒng)平臺