Giter Site home page Giter Site logo

Support image alt text about perlite HOT 3 CLOSED

nesati avatar nesati commented on June 7, 2024
Support image alt text

from perlite.

Comments (3)

lennartbrandin avatar lennartbrandin commented on June 7, 2024

This is really useful as the link converter im using also adds the old md link name as a caption and thus the image do not render. It would be a nice feature.

To remove all existing embed picture captions one might use find to select all md files from the current folder tree and replace all ![[abc|def]] occurrences with ![[abc]]:

find . -type f -name '*.md' | while read i; do sed -i -r 's/\!\[\[(.*?)\|.*?\]\]/\!\[\[\1\]\]/g' $i; done

from perlite.

secure-77 avatar secure-77 commented on June 7, 2024

I added some more regex magic, in the next release you can use the following syntax to provide both, image alt text and size attributes for your embedded images.

Image with size and description

![[docs/Pasted image 202401101247081.png|Description of the image contents|100x100]]

will render as

<img class="images" width="100" height="100" alt="Description of the image content|" src="Demo/Demo Documents/docs/Pasted image 202401101247081.png">

Image with description only

![[docs/Pasted image 202401101247081.png|Description of the image content]]

will render as

<img class="images" alt="Description of the image contents" src="Demo/Demo Documents/docs/Pasted image 202401101247081.png">

Image with size only

![[docs/Pasted image 202401101247081.png|100x100]]

will render as

<img class="images" width="100" height="100" alt="image not found" src="Demo/Demo Documents/docs/Pasted image 202401101247081.png">

from perlite.

secure-77 avatar secure-77 commented on June 7, 2024

fixed / implemented in 1.5.8

from perlite.

Related Issues (20)

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.