Issue #3371Opened March 29, 2021by devtechk2 reactions

Generate pages numbers any idea?

Question

Hi, guys I'm creating a doc generator through grapesjs, I'd like to insert page numbers like "Page 1 of 5" at the bottom of each page. My starting template have a wrapping class called .page actually I'm able to clone one page under one other to get more pages. Do you have any idea, how can i implement this feature ?

Thank you!

Answers (1)

devtechkMarch 30, 20212 reactions

Hi Guys! I've found a way to achieve my goal! CSS property!

here's my working code (you can call pagination tag as you want).

Source: https://www.pagedmedia.org/paged-js/

HTML: <pagination class="text-right paginating">Pag </pagination>

CSS

  body {
    counter-reset: pagination;
  }
  
  pagination {
    counter-increment: pagination;
  }
  
  pagination::after {
    content: counter(pagination)
  }

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.