Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown field support through SimpleMDE #2949

Merged
merged 1 commit into from
Dec 29, 2017

Conversation

d9su
Copy link
Contributor

@d9su d9su commented Oct 24, 2017

I was looking for markdown editing support in rails_admin and came across this stale issue #1235. After some digging I couldn't find a satisfactory solution in built-in support or plugins, so thought I'd take a stab at it myself.

I decided to go with SimpleMDE after some research since it looks neat and very simple to use.

With this feature, you can do field :text_field, :simple_mde and have a SimpleMDE markdown editor. The easiest way to enable it is simplemde-rails which unfortunately uses a somewhat outdated SimpleMDE version, but I've opened an issue there to hopefully update it fixed in KHN190/simplemde-rails#1. Users can also just load SimpleMDE themselves.

This is how it looks like:

screen shot 2017-10-24 at 3 24 17 pm

Test coverage:

-users-rexsu-src-github com-rails_admin-coverage-index html

Linter is complaining that 2 lines in the coffeescripts are too long... but there are longer lines existing in the same file, not sure if I should bother with it.

cc @mshibuya

@d9su
Copy link
Contributor Author

d9su commented Nov 13, 2017

Hey hey, may I get some thoughts on this? It'd be great if we can get it in the gem, so let me know what I can do to achieve that 😃

@coorasse
Copy link
Contributor

Would be really glad to see this feature 👍

@philschoefer
Copy link

This would be a great addition. Please merge!

@mshibuya mshibuya merged commit 57961eb into railsadminteam:master Dec 29, 2017
@mshibuya
Copy link
Member

Nice work, thanks!

@d9su d9su deleted the simple-mde branch January 2, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants