Redactor is incredibly versatile, allowing you to create custom content templates effortlessly.
<!-- font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:ital,wght@0,400;0,700;1,400;1,700&display=swap&1702898754417">
<!-- style -->
<style>
.rx-container,
.rx-editor {
background: #f5f5f5;
}
.rx-content {
font-family: "Montserrat", sans-serif;
}
.rx-content figure img {
border-radius: 6px;
}
.rx-content h1 {
font-size: 42px;
}
.rx-content .float-right {
margin-top: 24px;
}
.rx-content .dropcap:first-letter {
float: left;
padding: 0 0.1em 0 0;
font-size: 72px;
line-height: 72px;
font-family: "Merriweather", serif;
}
.rx-content .lead {
font-weight: bold;
font-size: 20px;
}
.rx-content .quote {
position: relative;
padding-left: 44px;
border-left: none;
}
.rx-content .quote:before {
position: absolute;
top: -4px;
left: 0;
content: "\201C";
font-style: normal;
font-size: 80px;
line-height: 1;
color: #F1E016;
}
.rx-content .quote p {
font-family: "Merriweather", serif;
font-weight: bold;
font-style: normal;
font-size: 18px;
}
.rx-content .quote figcaption {
font-family: "Montserrat", sans-serif;
font-size: 14px;
font-style: normal;
color: rgba(3, 25, 39, 0.5);
}
</style>
<!-- element -->
<textarea id="entry">...</textarea>
<!-- call -->
<script>
let app = Redactor('#entry', {
width: '75%',
padding: '32px 0 64px 0',
classes: {
blocks: {
'quote': 'quote'
}
},
formatItems: {
lead: {
title: "Lead",
type: 'text',
params: {
tag: 'p',
classname: 'lead'
}
},
dropcap: {
title: "Dropcap",
type: 'text',
params: {
tag: 'p',
classname: 'dropcap'
}
}
},
image: {
upload: '/your-path-to-upload'
}
});
</script>