-
Notifications
You must be signed in to change notification settings - Fork 22
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
Multiple font-pickers #1
Comments
Unfortunately, it is currently only possible to have one font picker. I will look into it though and keep you updated. |
I just added the option to have multiple font pickers on the same site. For them to work, you need to give both font pickers a Here's an example: <div id="font-picker-1"></div>
<div id="font-picker-2"></div>
<p class="apply-font-1">Text in font 1</p>
<p class="apply-font-2">Text in font 2</p>
<script type="text/javascript" src="./path/to/dist/index.js"></script>
<script type="text/javascript">
const fontPicker1 = new FontPicker(
'YOUR_API_KEY',
'Open Sans',
{ name: '1' }
);
const fontPicker2 = new FontPicker(
'YOUR_API_KEY',
'Roboto',
{ name: '2' }
);
fontPicker1.init();
fontPicker2.init();
</script> Hope this helps :) |
Works great, thanks for the update! |
Hello, what would be the best method to have multiple font-pickers?
The text was updated successfully, but these errors were encountered: