Join Carl Peaslee for an in-depth discussion in this video Creating markup with highlight.js, part of React: ES6, ES2016, and Beyond.
- [Instructor] In this video, we're going to complete…some of the functionality for our site.…Let's go back to the webpage and see what we have.…So we can put in text and we can create rules,…but none of it's actually happening.…It isn't taking effect, our styles aren't being…applied to our text, and our text isn't even…actually showing up.…So what we're going to use is a library called highlight.js.…And highlight.js, it allows us to turn…text in this text area into HTML markup…that's going to be rendered on a div…behind the text area.…
Our text area will remain invisible,…and so it'll look like our text has actually been styled…in this marked up way.…So our styles here in the left will get passed into…the div that is holding our markup,…and those will be applied to it.…So the first thing we're going to do…is we're going to go to our Terminal,…and we'll shut down our server for a second,…and we'll add highlight.js to our repository.…I'm going to say Yarn…add highlight.js.…And remember, if you're using NPM, you'd say…
- Using const and let
- Importing and exporting modules
- Arrow functions
- Destructing assignments
- Arguments and template literals
- Extended parameter handling with the spread operator
- Generating custom styles
- Classes, getters and setters
Skill Level Intermediate
1. Variables and Declarations
2. Arguments and Template Literals
4. Promises and Async
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.