diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py
index a8b0ffa0429..acbd6fb7144 100644
--- a/ckan/lib/helpers.py
+++ b/ckan/lib/helpers.py
@@ -552,6 +552,34 @@ def dump_json(obj):
import json
return json.dumps(obj)
+def markdown_editor(fieldname, value, id='', placeholder=None):
+ from pylons.i18n import _
+ from string import Template
+ if not placeholder:
+ placeholder = _('Start with a summary sentence ...')
+ if not value:
+ value = ''
+ template = Template('''
+
\
\
@@ -77,7 +78,9 @@ CKAN.Templates.resourceDetails = ' \
\
\
\
-
\
+
\
+ \
+
\
\
You can use Markdown formatting here. \
\
diff --git a/ckan/templates/group/new_group_form.html b/ckan/templates/group/new_group_form.html
index 9fb953f3728..32d20e9d6f8 100644
--- a/ckan/templates/group/new_group_form.html
+++ b/ckan/templates/group/new_group_form.html
@@ -38,15 +38,7 @@
Errors in form
-
+ ${h.markdown_editor('notes',data.get('description',''),id='notes')}
diff --git a/ckan/templates/package/new_package_form.html b/ckan/templates/package/new_package_form.html
index 6096dc7054a..b1d65d2c64e 100644
--- a/ckan/templates/package/new_package_form.html
+++ b/ckan/templates/package/new_package_form.html
@@ -82,15 +82,7 @@
Errors in form
-
+ ${h.markdown_editor('notes', data.get('notes'), id='notes')}
diff --git a/ckan/templates/user/edit_user_form.html b/ckan/templates/user/edit_user_form.html
index d9e5782a370..cea1fbba0ef 100644
--- a/ckan/templates/user/edit_user_form.html
+++ b/ckan/templates/user/edit_user_form.html
@@ -36,15 +36,7 @@
Errors in form
-
+ ${h.markdown_editor('about',data.get('about',''),id='about',placeholder=_('A little about you...'))}