Skip to content

Instantly share code, notes, and snippets.

@ademers
Created May 1, 2013 15:54
Show Gist options
  • Save ademers/5496140 to your computer and use it in GitHub Desktop.
Save ademers/5496140 to your computer and use it in GitHub Desktop.
SafeCracker RTE Simplified
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Blog/publish</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- <link rel="stylesheet" href="/css/normalize.css"> -->
<!-- <link rel="stylesheet" href="/css/main.css"> -->
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<h1>Blog/publish</h1>
<p>Hello world! This is HTML5 Boilerplate.</p>
{exp:safecracker
channel="blog"
allow_comments="yes"
return="blog/URL_TITLE"
datepicker="no"
include_jquery="yes"
error_handling="inline"
safecracker_head="yes"
rte_selector=".rte"
}
<fieldset class="control-group {if error:title}error{/if}">
<label class="control-label" for="title">Post Title</label>
<div class="controls">
<input class="span8" type="text" name="title" id="title" value="{title}">
{if error:title}<span class="help-block">The Title field is required.</span>{/if}
</div>
</fieldset>
<fieldset class="control-group {if error:blog_body}error{/if}">
<label class="control-label" for="blog_body">Post Body</label>
<div class="controls">
<textarea class="span8 rte" name="blog_body" id="blog_body" rows="24">{blog_body}</textarea>
<span class="help-block">{instructions:blog_body}</span>
{if error:blog_body}
<span class="help-block">The Blog Body field is required.</span>
{/if}
</div>
</fieldset>
<fieldset class="form-actions">
<button type="submit" class="btn btn-primary">Publish</button>
<button type="reset" class="btn">Cancel</button>
</fieldset>
{/exp:safecracker}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment