Giter Site home page Giter Site logo

craft-glossary's People

Contributors

kringkaste avatar storybynumbers avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

craft-glossary's Issues

Missing term definitions

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.

Multisite

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

Term synonym field with trailing comma breaks frontend

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:

Screen Shot 2022-06-30 at 16 46 07

Frontend:

Screen Shot 2022-06-30 at 16 31 26

Rendered HTML:

WhatsApp Image 2022-06-30 at 4 45 34 PM

Tooltip not appearing

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?

Save a term

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

Craft 5 Support

Is there a timeline for when this will be available for Craft 5?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.