Angular Markdown Preview

Developer
Size
2,988 Kb
Views
4,048

How do I make an angular markdown preview?

Edit the markdown to recieve a live previewForked from Brian Douglas's Pen Angular Markdown Preview.. What is a angular markdown preview? How do you make a angular markdown preview? This script and codes were developed by Toby on 24 January 2023, Tuesday.

Angular Markdown Preview Previews

Angular Markdown Preview - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Angular Markdown Preview</title> <meta name="viewport" content="width=device-width, initial-scale=1 scroll=0"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html lang="en">
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"> <title>Markdown Editor</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title itemprop="name">Toby Dennison</title> <meta name="description" content="A simple web application for writing and previewing Markdown on my iPhone 6.">
</head>
<body> <div ng-app="app"> <div class="container"> <!--<h2 class="heading">Angular Markdown Editor</h2>--> <h4 class="heading">Angular Markdown Editor Using <a href="https://github.com/showdownjs/showdown" target="_blank">Showdown.js</a></h4> <div class="row"> <div class="one-half column"> <textarea class="form-control" ng-init="rawmd='## Markdown preview
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam cursus pellentesque ante ac cursus. Aliquam vulputate sit amet nulla a convallis.
__Dolar set__
Aliquam ultrices viverra tellus vel sagittis. Nam at dignissim ex. Suspendisse lacus eros, congue lobortis egestas id, tincidunt at odio. Etiam lobortis tincidunt augue at vehicula.
Vestibulum volutpat, ipsum sed tristique vulputate, nisl lorem pharetra est, dictum pretium dui tortor a lectus.'" ng-model="rawmd"></textarea> </div> <div class="one-half column"> <div ng-bind-html="rawmd | markdown"></div> </div> </div> </div> </div>
</body>
</html> <script src='https://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Angular Markdown Preview - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:400,700);
@import url(https://fonts.googleapis.com/css?family=Roboto);
* { box-sizing: border-box;
}
body { font-family: 'Roboto Slab', serif; font-weight: 400; color: #666;
}
.fields label { display: block; margin-bottom: 1.5em; font-weight: bold;
}
.fields label input,
.fields label select { font-weight: normal; margin-left: 1em;
}
div { font-family: 'Roboto Slab', serif;
}
textarea { border: 1px solid #ddd; border-radius: 5px; font-family: 'Roboto Slab', serif; padding: 1em; width: 100%; min-height: 100vh; resize: none; /* My CSS */
}
/* iPhone 6 Portrait and Landscape */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) { textarea { min-height: 70vh; }
}
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1) { textarea { min-height: 85vh; }
}
.heading { font-family: 'Roboto Slab', serif; font-weight: 700; text-align: center; margin: 0.75em 0; /* My CSS */
}

Angular Markdown Preview - Script Codes JS Codes

angular.module('app', []) .filter('markdown', function($sce) { var converter = new Showdown.converter(); return function(value) { var html = converter.makeHtml(value || ''); return $sce.trustAsHtml(html); }; });
Angular Markdown Preview - Script Codes
Angular Markdown Preview - Script Codes
Home Page Home
Developer Toby
Username tobydennison
Uploaded January 24, 2023
Rating 3
Size 2,988 Kb
Views 4,048
Do you need developer help for Angular Markdown Preview?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Toby (tobydennison) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!