[openstreetmap-website] Markdown (#28)

Tom Hughes reply+i-3529812-9d547608ea717967462c0098a34f11581e4c11b2-1419053 at reply.github.com
Tue Mar 6 19:22:18 GMT 2012


This branch updates the web site to accept Markdown test formatting everywhere (diary entries, comments, messages, user descriptions) where blocks of text can be entered. I hope this is an in improvement over the current situation where we accept HTML subject to sanitisation, and also attempt to auto-link URLs. A live version can be found on the dev server:

    http://markdown.apis.dev.openstreetmap.org/

Each text area now comes with a side panel displaying brief help text and buttons allowing the user to switch between edit mode and a preview view.

One unresolved issue is to how to handle the mail gateway for messages and diary comments.

You can merge this Pull Request by running:

  git pull https://github.com/tomhughes/openstreetmap-website markdown

Or you can view, comment on it, or merge it online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/28

-- Commit Summary --

* Treat all newly entered blocks of text as Markdown
* Grow text areas automatically in response to input
* Add preview functionality to rich text controls
* Show an animation while a preview is loading
* Only reload the preview if the content has changed
* Make spam scoring work with new rich text system
* Add an HTML version of the diary comment notification mail

-- File Changes --

M Gemfile (3)
M Gemfile.lock (2)
A app/assets/images/loading.gif (0)
M app/assets/javascripts/site.js (63)
M app/assets/stylesheets/common.css.scss (64)
M app/controllers/site_controller.rb (4)
M app/helpers/application_helper.rb (26)
M app/models/diary_comment.rb (12)
M app/models/diary_entry.rb (12)
M app/models/message.rb (12)
M app/models/user.rb (15)
M app/models/user_block.rb (17)
M app/views/diary_entry/_diary_comment.html.erb (2)
M app/views/diary_entry/_diary_entry.html.erb (2)
M app/views/diary_entry/comments.html.erb (2)
M app/views/diary_entry/edit.html.erb (2)
M app/views/diary_entry/rss.rss.builder (2)
M app/views/diary_entry/view.html.erb (4)
M app/views/layouts/site.html.erb (3)
M app/views/message/new.html.erb (2)
M app/views/message/read.html.erb (4)
A app/views/notifier/diary_comment_notification.html.erb (9)
M app/views/notifier/diary_comment_notification.text.erb (2)
M app/views/notifier/message_notification.html.erb (2)
M app/views/notifier/message_notification.text.erb (2)
A app/views/site/_markdown_help.html.erb (29)
M app/views/user/_user.html.erb (2)
M app/views/user/account.html.erb (2)
M app/views/user/view.html.erb (2)
M app/views/user_blocks/new.html.erb (2)
M app/views/user_blocks/show.html.erb (2)
M config/locales/en.yml (17)
M config/routes.rb (3)
A db/migrate/20120214210114_add_text_format.rb (21)
M lib/osm.rb (22)
A lib/rich_text.rb (81)
A vendor/assets/jquery/jquery.autogrowtextarea.js (61)
A vendor/assets/jquery/jquery.timers.js (138)

-- Patch Links --

  https://github.com/openstreetmap/openstreetmap-website/pull/28.patch
  https://github.com/openstreetmap/openstreetmap-website/pull/28.diff

--- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/28



More information about the rails-dev mailing list