Giter VIP home page Giter VIP logo

Comments (3)

LazyClicks avatar LazyClicks commented on July 19, 2024 2

issue is related to preline docs for qwik not being correct and missing important pieces
first is how to import preline script in a correct way
inside root.tsx

import PrelineUI from "../node_modules/preline/preline.js?raw";
\\
\\
\\
 <script dangerouslySetInnerHTML={PrelineUI as string} />

and then inside layout.tsx or inside the routes that need preline.js

import type { IStaticMethods } from "preline/preline";

declare global {
  interface Window {
    HSStaticMethods: IStaticMethods;
  }
}
  useVisibleTask$(() => {
    window.HSStaticMethods.autoInit();
  });```

im more than happy to make a pr for the docs for qwik if the preline team is okey with that
if not just giving me the page which contains the specific qwik docs and ill update it correctly

from preline.

jahaganiev avatar jahaganiev commented on July 19, 2024

@LazyClicks thanks for sharing the workaround! We've added a backlink in our docs for this solution. Cheers!

from preline.

LazyClicks avatar LazyClicks commented on July 19, 2024

@LazyClicks thanks for sharing the workaround! We've added a backlink in our docs for this solution. Cheers!

is it possible to change the qwik docs or mention that this workaround is required to get preline js to work with qwik on production apps?

from preline.

Related Issues (20)

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.