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

Text support #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Text support #1

wants to merge 8 commits into from

Conversation

ajmeese7
Copy link

@ajmeese7 ajmeese7 commented Oct 4, 2020

Now users can add a data-lettercrap-text attribute with the text they want shown instead of an image, by generating an image locally via a canvas.

Lettercrap from text example

I also added documentation for how to run the example folder locally, since security has issues with opening images from just the HTML file when not on a server.

Edit: if you could add the hacktoberfest-accepted label to this PR as explained here, should you decide to merge it, it would be greatly appreciated. I'm hoping for this to count towards my Hacktoberfest PR count.

Avoiding the errors shown in the Firefox console about no defined charset.
There were some security features preventing just loading up the normal HTML, so I added the instructions to avoid those. I also cleaned up the code a little bit to my liking.
No need for repeated inline styles when the CSS can handle it for all of them.
The feature is working, albeit not as well as I'd hoped. The canvas height is still way off, so I'm looking for a way to correct that before pushing a PR.
The image isn't way taller than necessary now, so it's right on par with the image-generated text now.
Implementing those features isn't feasible at the moment. If users really want that deep level of customization, they can either implement it and push it themselves or generate the image on another site like before.
Instead of expecting users to run the example.html file to see the new feature in action, it's now easily explained so they can use it right away.
Now the library can be imported into a React project without the linter yelling about using an 'undefined' variable and '==' instead of '==='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant