Giter Site home page Giter Site logo

Comments (2)

steve8708 avatar steve8708 commented on April 28, 2024 1

Hey @TechQuery - thanks for the question!

We are actually in the process of making this easier and having documentation for how to do it yourself. In short, using our HTML API is the easiest way, e.g.

fetch(
  `https://cdn.builder.io/api/v1/html/${modelName}?url=${encodeURIComponent(location.href)}&apiKey=${apiKey}`
)
.then(res => res.json())
.then(content => {
  if (content) {
    element.innerHTML = content.data.html
  } else {
    // trigger some kind of "not found" callback
  }
})

Where you might take modelName and apiKey as input args to your component. Note that the HTML API response uses a webcomponent called builder-component by default so be sure to name your component anything else, e.g.

<builder model="..." apiKey="..." /> and call the HTML API internally and you should be good!

Happy to answer questions anytime you get stuck and follow up with the full integration docs when available

And we have a more advanced example coming in the next few weeks on how to do a deeper integration that involves rendering all of the content in your framework components and using your components in the editor

from builder.

steve8708 avatar steve8708 commented on April 28, 2024

Going to leave this open for now until we have our easier way to add full framework support coming up

from builder.

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.