Website Building » Wix » How Do I Add a Flipbook to Wix?

How Do I Add a Flipbook to Wix?

Last updated on January 7, 2023 @ 4:35 am

There are two ways to add a Flipbook to Wix. The first is to use the Wix Editor, and the second is to use Wix Code.

To add a Flipbook using the Wix Editor:

GREAT NEWS:

Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.

  1. Open the Wix Editor and click on the +Add button in the left-hand sidebar.
  2. In the Add menu, select More.
  3. In the More menu, select Flipbook.
  4. A new Flipbook will be added to your page. You can then edit the Flipbook settings by clicking on the gear icon in the top-right corner of the element.

To add a Flipbook using Wix Code:

  1. Open the Wix Editor and click on the +Add button in the left-hand sidebar.
  2. In the Add menu, select Code.
  3. In the Code window, paste the following code:
import wixWindow from 'wix-window';
import wixData from 'wix-data';

$w.onReady(function () {
  $w("#flipbook").onReady(function() {
   wixWindow.getCurrentView().then(view => {
     $w("#flipbook").addFlipbook({
       width: "100%",
       height: "100%",
       documentId: view.path.split("/")[3]
      });
    });
  });
});

This code uses the “wixWindow” and “wixData” modules to add a Flipbook to the page. The “onReady” event handler is used to ensure that the Flipbook element is fully loaded before the “addFlipbook” function is called. The “addFlipbook” function takes an object as an argument, which specifies the width, height, and document ID of the Flipbook. The document ID is obtained by splitting the URL path and extracting the third element.

To use this code, you will need to create a Flipbook element in the Wix Editor and give it an ID of “flipbook”. You can then add the code to a Code element on the same page as the Flipbook element. When the page loads, the code will add the Flipbook to the page using the specified settings.

PRO TIP: If you are thinking about adding a flipbook to your Wix website, there are a few things you should know. First, flipbooks can be very resource-intensive, so they may slow down your website. Second, because they are interactive, they can be difficult for search engines to index, so your website’s search engine optimization (SEO) may suffer. Finally, because they are often hosted on third-party servers, there is a risk that the service may go down or the flipbook may be taken down for violating the terms of service.
Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.