Skip to content

Add markdown field support through SimpleMDE#2949

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
d9su:simple-mde
Dec 29, 2017
Merged

Add markdown field support through SimpleMDE#2949
mshibuya merged 1 commit into
railsadminteam:masterfrom
d9su:simple-mde

Conversation

@d9su
Copy link
Copy Markdown
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.zerozr99.workers.dev-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
Copy Markdown
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
Copy Markdown
Contributor

Would be really glad to see this feature 👍

@philschoefer
Copy link
Copy Markdown

This would be a great addition. Please merge!

@mshibuya mshibuya merged commit 57961eb into railsadminteam:master Dec 29, 2017
@mshibuya
Copy link
Copy Markdown
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