Giter Club home page Giter Club logo

Comments (5)

senny avatar senny commented on August 21, 2024

Hi @maggielei

Thanks for reaching out. Sablon is not specifically supporting Hyperlinks at this time so it's definitely possible that this is not working as expected. You could work on a patch to add this functionality to Sablon.

@stadelmanma did you have any plans to do links on HTML insertion? Or is your project in need to use Sablon templates with Hyperlinks?

from sablon.

stadelmanma avatar stadelmanma commented on August 21, 2024

@maggielei @senny
Currently our workflow doesn't involve hyperlinks at all so I didn't plan on adding support for an <a> tag.

Reading that stack overflow answer made it seem like native mail merge support was shaky at best.

I saved a test document and unzipped it to see how MS Word handled hyperlinks and it looks like an HTML insertion would be the best way. You would use the href attribute to set the target in document.xml.rels and the actual content between the <a>...</a> to set up the w:hyperlink node in document.xml. However, the bigger issue is that currently HTML insertion replaces the entire paragraph which would be less than desirable in this case.

I don't know how hard it would be to allow "inline" elements <a>, <b>, <span>, etc. to replace an individual run instead.

from sablon.

maggielei avatar maggielei commented on August 21, 2024

@senny @stadelmanma
Thank you both for your quick responses! I'll be subscribing to #47 for more updates and in the meantime I'll try to see if I can come up with my own solution. Thanks again.

from sablon.

stadelmanma avatar stadelmanma commented on August 21, 2024

@maggielei hyperlink creation is now possible on the master branch via HTML content insertion. However, it currently comes with the limitation that the entire paragraph must be replaced. Inline HTML/WordML insertion is something I am working on now.

from sablon.

stadelmanma avatar stadelmanma commented on August 21, 2024

@maggielei See here for a method to insert HTML hyperlinks into a document without replacing the entire paragraph.

from sablon.

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.