We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In case someone need to add target value to anchor. here is a simple solution to do it.
export const BtnLink = createButton( "Link", <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className={btnSize} > <path strokeLinecap="round" strokeLinejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg>, ({ $selection }) => { if ($selection?.nodeName === "A") { document.execCommand("unlink"); } else { const Selection = document.getSelection()?.toString(); // eslint-disable-next-line no-alert -- ignore const Uri = prompt("URL", ""); document.execCommand( "insertHTML", false, Uri ? `<a href="${Uri}" target="_blank">${Selection ? Selection : Uri}</a>` : Selection, ); } }, );
The text was updated successfully, but these errors were encountered:
Thanks, I just added a link to this sample to the README
Sorry, something went wrong.
No branches or pull requests
In case someone need to add target value to anchor. here is a simple solution to do it.
The text was updated successfully, but these errors were encountered: