Skip to content

Markdown Widget #1491

Closed
Closed

Description

@pickypg

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>

Activity

  1. i-a-n commented on Dec 3, 2019

    @i-a-n
    Contributor

    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

  2. snide commented on Dec 3, 2019

    @snide
    Contributor

    @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.

  3. i-a-n commented on Dec 3, 2019

    @i-a-n
    Contributor

    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.

  4. ajangus commented on Dec 5, 2019

    @ajangus

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

  5. snide commented on Dec 5, 2019

    @snide
    Contributor

    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.

  6. ajangus commented on Feb 20, 2020

    @ajangus

    With #2858 moving forward, closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions