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 Widget #1491

Closed
pickypg opened this issue Jan 29, 2019 · 6 comments
Closed

Markdown Widget #1491

pickypg opened this issue Jan 29, 2019 · 6 comments

Comments

@pickypg
Copy link
Member

pickypg commented Jan 29, 2019

This is an issue for a requested new control within EUI: a Markdown-wrapper.

Specifically, I would love to be able to pass something close to if not identical to GitHub Markdown. This may not align very well with existing Kibana Markdown needs though, and I can see certain desirable limitations (e.g., not supporting images).

Imagine this kind of text coming in:

Hey name,

I was hoping that you could answer some questions about this:

> Earlier quote asking about `code`

Sure, what you are looking to do is:

```js
This is a code block
```

You can review that [here](http://some-link.example).

Hope that helps,
Chris

Beyond that our native blockquote CSS looks very different, this should render as something like

<p>Hey name,</p>
<p>I was hoping that you could answer some questions about this:</p>
<blockquote>Earlier quote asking about <EuiCode>code</EuiCode></blockquote>
<p>Sure, what you are looking to do is:</p>
<EuiCodeBlock language="js">This is a code block</EuiCodeBlock>
<p>
  You can review <EuiLink href="http://some-link.example" target="_blank">here</EuiLink>.
</p>
<p>
  Hope that helps,
  <br />
  Chris
<p>
@i-a-n
Copy link
Contributor

i-a-n commented Dec 3, 2019

note that this has been developed for the Dream Machine project here: https://github.com/elastic/dream-machine/pull/141

could be a decent starting-off point

image

@snide
Copy link
Contributor

snide commented Dec 3, 2019

@i-a-n if you wanted to kickstart a PR when you're happy with it, we could take it over and clean up design / accessibility and likely CSP issues that will arise. There's definitely a want for this component, but my guess is it would take a few weeks to get polished where we'd feel comfortable having usage in a place like cloud and you likely don't have time for all the touchup work. But by all means give us a start with what you've got and we can do some work on it.

@i-a-n
Copy link
Contributor

i-a-n commented Dec 3, 2019

sounds good @snide , thanks. I have one outstanding issue to resolve regarding how the text insertion works, but once that's complete I'll open a PR here.

@ajangus
Copy link

ajangus commented Dec 5, 2019

Are there any strong feelings on what the preview button should say? @inqueue suggested Preview instead of Preview markdown

@snide
Copy link
Contributor

snide commented Dec 5, 2019

This will likely go through a few rounds of design. I wouldn't worry too much about the layout or text. We can clean it up during a design pass.

@ajangus
Copy link

ajangus commented Feb 20, 2020

With #2858 moving forward, closing this one.

@ajangus ajangus closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants