Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo links with Object URLs #982

Open
jcubic opened this issue Nov 2, 2024 · 0 comments
Open

Echo links with Object URLs #982

jcubic opened this issue Nov 2, 2024 · 0 comments
Labels
feature resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Nov 2, 2024

I have an idea for a new feature for jQuery Terminal

This should work:

term.echo(`<a href="${blob('hello world')}" download="hello.txt">download</a>`);

function blob(str) {
    const blob = new Blob([str], { type: 'text/plain' });
    return URL.createObjectURL(blob);
}

See demo: https://codepen.io/jcubic/pen/xxvzmQM?editors=0011

@jcubic jcubic added the feature label Nov 2, 2024
jcubic added a commit that referenced this issue Nov 2, 2024
jcubic added a commit that referenced this issue Nov 2, 2024
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant