CMIContent Marketing InstituteContent directory

News · General · Archive

Codemirror Pug Templating Mode

Home News

.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}

CodeMirror

Home Manual Code

Language modes Pug Templating Mode

Pug Templating Mode

doctype html html head title= "Pug Templating CodeMirror Mode Example" link(rel='stylesheet', href='/css/bootstrap.min.css') link(rel='stylesheet', href='/css/index.css') script(type='text/javascript', src='/js/jquery-1.9.1.min.js') script(type='text/javascript', src='/js/bootstrap.min.js') body div.header h1 Welcome to this Example div.spots if locals.spots each spot in spots div.spot.well div if spot.logo img.img-rounded.logo(src=spot.logo) else img.img-rounded.logo(src="img/placeholder.png") h3 a(href=spot.hash) ##{spot.hash} if spot.title span.title #{spot.title} if spot.desc div #{spot.desc} else h3 There are no spots currently available.

var editor = CodeMirror.fromTextArea(document.getElementById("code"), { mode: {name: "pug", alignCDATA: true}, lineNumbers: true });

The Pug Templating Mode

Created by Forbes Lindesay. Managed as part of a Brackets extension at https://github.com/ForbesLindesay/jade-brackets .

MIME type defined: text/x-pug , text/x-jade .

More in Archive · More in General · More in News