Giter VIP home page Giter VIP logo

Comments (5)

p-kuen avatar p-kuen commented on May 30, 2024

This is strange because it is just a simple wrapper around markdown-it.
Can you please post your code please?

from vue-markdown-render.

Gaojianli avatar Gaojianli commented on May 30, 2024

@Patcher56 Of course! Here is the vue file:
https://github.com/Gaojianli/UrlShorter-web/blob/461fed489dbe69071d5ee19e9c39072f062de5ea/src/components/API.vue#L1-L22
And this is my markdown file:
https://github.com/Gaojianli/UrlShorter-web/blob/461fed489dbe69071d5ee19e9c39072f062de5ea/src/assets/APIDoc.md
Finally, this is the result page:
https://short.u2b.eu/api

As you can see, tables in this page do not have any style:
image

from vue-markdown-render.

p-kuen avatar p-kuen commented on May 30, 2024

Oh, I thought the table does not get formatted at all. vue-markdown-render does not provide any styles at all. It just formats it as a table in this case, so you have to do the styles by yourself. In this case you just have to add border styles in css to see the borders.

This gives you more flexibility and does not give you opinionated styles.

from vue-markdown-render.

Gaojianli avatar Gaojianli commented on May 30, 2024

I mean is there any way to add a class to the table? I dont't think it's a good idea to add a element selector.

Moreover, the example of markdown-it has generated a class for its tables
image

Would you please tell me how to reproduce it?

from vue-markdown-render.

p-kuen avatar p-kuen commented on May 30, 2024

I would suggest wrapping your markdown content into a div with a class on it and set the css rules with this class.
Another option could be markdown-it/markdown-it#117 (comment), but therefore we have to allow access to the MarkdownIt instance.

from vue-markdown-render.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.