codemonauts / craft-glossary Goto Github PK
View Code? Open in Web Editor NEWGlossaries for Craft CMS
License: Other
Glossaries for Craft CMS
License: Other
I am applying the glossary to a field within a repeating matrix block, and running into this error:
Glossary.js?v=1655385555:formatted:1947 Uncaught TypeError: Cannot read properties of null (reading 'innerHTML')
at content (Glossary.js?v=1655385555:formatted:1947:46)
Words are underlined properly, but the #glossary-terms
element is missing a number of definitions.
Your plugin looks interesting, but I have a few concerns about how robust it might prove to be with multiple sites/languages. I can probably work around these to a limited extent using by creating separate glossaries for each site (matching the site and glossary handles, and then in the front end calling the site handle to specific the glossary), but I do wonder if you have ever considered adding support for multiple sites?
Thanks in advance for any help or advice you may be able to give with this.
Cheers, Andrew
If a term has a list of synonyms ending in a trailing comma, spaces will be treated as a synonym for that term. It results in broken HTML, and terms are replaced with with IDs instead of underlined words. See screenshots below. Removing the trailing comma resolves the issue.
Backend:
Frontend:
Rendered HTML:
Have added {% hook 'glossary-terms' %}
to my layout template.
I've glossary items that match content in a redactor field. On the front end I have this:
{{ block.textSummary|glossary }}
though {{ block.textSummary|glossary(educationDisrupted }}
with glossary handle returns twig errors. Using the first line I can see that the appropriate terms are getting wrapped like this <span class="glossary" data-glossary-term="term-193863">Polish</span>
I can also see that this script tag has been injected into the page <script src="//localhost:3000/cpresources/7678b98/js/Glossary.js?v=1636640767"></script>
However the glossary definitions are not appearing as tooltips or in the source of the page.
In the glossary settings my tooltip template is set to exhibits/education-disrupted/_includes/tooltip.twig
and that templlate is using the default suggested one from the docs.
Am I supposed to pull in tippy myself? the docs suggest that it will work as is without manually adding any tippy code.
Also is it possible to have only specific instances of a term linked and not every single instance used?
Thanks for this great plugin! I discovered a small issue:
If you want to use COMMAND + S to save a term, it is not working as expected and if you click on 'Save and continue editing', the term will close, so it behaves different from regular entries.
Best!
Marcel
Is there a timeline for when this will be available for Craft 5?
Is it possible to link to a glossary term from a redactor field and have it display as a tooltip?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.