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

Markdown support for complex data fields #537

Open
declan opened this issue Jul 30, 2014 · 6 comments
Open

Markdown support for complex data fields #537

declan opened this issue Jul 30, 2014 · 6 comments

Comments

@declan
Copy link
Contributor

declan commented Jul 30, 2014

As I mentioned on the Google group last week, we have some multi-paragraph data fields and have added Markdown support to deal with that in our fork. Do you guys see this as a common enough problem that you'd like to include it here too?

Here's what a pull request would look like:
https://github.com/purplebinder/ohana-web-search/commit/c3750d797c4ef8454adb878a4f0f878beafff78e

@anselmbradford
Copy link
Member

@declan sorry for the slow response on this. Just so I understand, so in the fields in the API you have markdown and this addition would render it? So for example, you could put markdown in say the description field and have a bulleted list, etc. displayed in that field on the page. I'd be slightly worried about the design consequences of the markdown. Are the lists, blockquotes, etc. that the markdown presumably could introduce styled?
Other than that, I don't really have strong feelings on this, @monfresh any thoughts from you?

@monfresh
Copy link
Member

@anselmbradford Markdown syntax is shorthand for HTML. Markdown interpreters convert the Markdown text to HTML. There is no styling involved.

@declan Your code seems reasonable, but I'd have to read more about RedCarpet and other Markdown gems to determine what's best.

@anselmbradford
Copy link
Member

@anselmbradford Markdown syntax is shorthand for HTML. Markdown interpreters convert the Markdown text to HTML. There is no styling involved.

Right, which is my concern. So you could have a description field that included, say <ul><li>item1</li><li>item2</li></ul>, and that would end up in the details view as a list, but without anything but the default or normalized styling (styling to normalize the default styling between browsers), which may look awful. So I'd just want to see any field that was exposing embedded HTML through markdown filled with the available markdown (lists, blockquotes, etc.) and checked to ensure the introduced HTML looks okay.

@monfresh
Copy link
Member

I don't understand your concern. You would convert the Markdown to HTML for specific fields, and you would add CSS for those fields to make sure they look nice.

@anselmbradford
Copy link
Member

Right, so checking the appearance and checking/updating the CSS would be part of this issue, right? That's all I'm saying.

@monfresh
Copy link
Member

Absolutely. Now I understand that your concern is that Declan's proposed PR didn't include styling. Communikayshon!

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

No branches or pull requests

3 participants