Code Monkey home page Code Monkey logo

Comments (3)

patrickdavey avatar patrickdavey commented on May 22, 2024

The short answer is "no", there certainly aren't any built in hooks to do this.

You can just embed raw html into your .md files and it will be placed verbatim into the HTML output. e.g. just place

<iframe width="560" height="315" src="https://www.youtube.com/watch?v=dQw4w9WgXcQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

into your .md and it will pop out the other end intact.

I don't think I want to stray too far from what vimwiki itself does. You'd also run into the problem of exactly what sort of embed to use (width, height etc). I guess you could pipe it on through to sed or something like that if you want to convert further.

If you want to propose (and build & test) a hook system then I'd be open to the idea. Alternatively I guess you could just fork this gem and build in your own processors :)

I'll leave this open for a few days, or, feel free to close it if you decide not to build the hook system :)

from vimwiki_markdown.

sdondley avatar sdondley commented on May 22, 2024

Thanks for getting back.

I found a way to do this. Basically, it's this:

  1. create your own html conversion script. make sure the script collects all the arguments passed to it
  2. tell vimwiki to use the custom conversion script with the custom_wiki2html setting
  3. in the custom script, make a call to vimwiki_markdown and pass the arguments along to it
  4. now have the script open the html file output by vimwiki_markdown in step 3
  5. make modifications to the html code
  6. save the code back to the same html file

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 22, 2024

Ah nice work :) yes, that'd work perfectly.

from vimwiki_markdown.

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.