Skip to content

Instantly share code, notes, and snippets.

@sean-clayton
Created April 20, 2014 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sean-clayton/11115942 to your computer and use it in GitHub Desktop.
Save sean-clayton/11115942 to your computer and use it in GitHub Desktop.
Here is my model I'm working with:
```Post.add({
title: { type: String, required: true },
slug: { type: String, index: true },
state: { type: Types.Select, options: 'draft, published, archived', default: 'draft', index: true },
author: { type: Types.Relationship, ref: 'User', index: true },
publishedDate: { type: Types.Date, index: true },
image: { type: Types.CloudinaryImage },
content: {
brief: { type: Types.Markdown, wysiwyg: true, height: 150 },
extended: { type: Types.Markdown, wysiwyg: true, height: 400 }
},
categories: { type: Types.Relationship, ref: 'PostCategory', many: true }
});```
Here is my input:
`## Hello world!`
`### This is a subtitle!`
And this is the output:
![](http://i.imgur.com/tVrXZXS.png)
I've read through [the documentation](http://keystonejs.com/docs/database/#fieldtypes-markdown) quite a bit, and looked through the [issues](https://github.com/JedWatson/keystone/issues) on [the GitHub repo](https://github.com/JedWatson/keystone), but maybe I'm overlooking something entirely that should be obvious?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment