Adding a CMS to Your Pyramid Web App Transcripts
Chapter: A rich editing experience
Lecture: Concept: Using SimpleMDE
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Well, I would say that simple mde lived up to its name.
0:04
It's a simple markdown editor, simple, and it's usage, not simple in its capabilities as you so high. It's really quite awesome.
0:11
Actually, Over here we're going to go to the page that we're gonna include the editor on, and we don't want to include this CSS style sheet on every part of our site that's just going to slow things down and potentially even override some styles that we're setting.
0:24
What we're gonna do instead is we're going toe included on Lee on the pages that need this editor by injecting it into the layout template that shared layout page through here.
0:34
We're adding a link to the CSS, and that's gonna be put at the top of the page that gives it its look and feel, and to give it the behavior it's going to have to have some JavaScript.
0:43
So two things basically one we're going to include the simple mde JavaScript. This were putting in the bottom of the page just for performance reasons.
0:51
Technically, it doesn't really matter where it is, but it the next line does required to be at least after the definition for the contents text area.
0:59
But we're gonna include that down at the bottom here and we're gonna say creating new simple MBE editor and we're not gonna take any not to make any changes to the many, many defaults.
1:09
If you go to the documentation at simple MD dot com, then go to their get home page. It's full of different things.
1:15
You can dio We're not interested in doing that.
1:17
We're just going to go and grab it and say, Go make this thing a whole lot better by making it a markdown editor don't get contents, which is our text area I d and load it up and off it goes, and that's it.
1:29
Our website feels much, much more professional for creating and editing markdown content compared to what it must have been just before we headed this right.
1:39
Going to be a lot better, and people are gonna enjoy working with it way more