Skip to content
Sign upLog in
← Back to Community

Markdown on your site

Profile icon
frostedbutton75

How? I’ve seen

@amasad
do it in his blog thing, but how do I insert it to HTML??

Answered by k9chelsea2 [earned 5 cycles]
View Answer
Voters
Profile icon
k9chelsea2
Profile icon
frostedbutton75
Comments
hotnewtop
Profile icon
CodingRobot12

I think to kind of use markdown, some of the concepts have to do with CSS I think.

Profile icon
frostedbutton75

Kay, thx, could you give me some code?

@CodingRobot12

Profile icon
k9chelsea2

hey so there are multiple ways to create "markdown" as

@CodingRobot12
rightly said it has to do with CSS but also HTML I will get some screenshots for you

Profile icon
frostedbutton75
Profile icon
k9chelsea2

HTML

<font size+" +5"> ``` this is what sets the size of the text (be warned that any text written after this will be that specific size even if you write that command twice the first time it is written it will set the font size for the whole text unless given a instruction that changes the font size specifcly but if after that command is written and you type in more text well lets just say it will go back to the original font size)
``` this chooses the colour (btw it can be any color or font size) (same as font size it sets it for the whole file code)
<p style="color:green""font-family:Cochin"> INSERT-TEXT-HERE</p>

the

instruction might mean something completly different in your code. this code sets the color of text and font style

<h1 style="font-family:Sans-seriff"> TEXT</h1>

sets font for specifc text

CSS

h1 { background-color: rgba(27, 11, 177, 0.911); color: rgba(243, 240, 86, 0.877); }

this is CSS, the bakcground-color command sets the color of the header the color sets the color of font
HTML

<p>text <span style="color: #412"> text </span>text<span style="color: #4caf">text </span>.text</p>

this basically changes color of text in a paragraph it can result in looking something like this

Screen Shot 2020-07-12 at 12.31.54 AM

(this is for a site i am working on)

but no info i give you is as useful as the tutorials you will find on [here] (https://www.w3schools.com/html/html_styles.asp) google how to style text and stuff and it will help :P

Profile icon
frostedbutton75
Profile icon
k9chelsea2

sorry if it was a bit long lol

Profile icon
frostedbutton75
Profile icon
k9chelsea2

as i said the link i gave you will provide millions more info that i could not give you lol

Profile icon
zplusfour

whaaaaaaaaaaaaaaaaaaaaaaaat????
you can simply just make a nodejs project
and you should install npm i marked

const marked = require('marked')

And i'll give you some code:

image


Then, with the database:
you should install JSDOM and dompurify:

const {JSDOM} = require('jsdom'); const create_dompurify = require('dompurify'); const dompurify = create_dompurify(new JSDOM().window)

image

Profile icon
frostedbutton75

K! Thx.

@ZDev1

I’ll upvote; I aLready marked an answer

Profile icon
zplusfour

@frostedbutton75
you can mark another answer