GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

[QUESTION] Is it possible to use grapejs for printable documents? #2776

Closed math-artist closed 4 years ago

math-artist commented 4 years ago

Hello, I have a requirement to create a drag and drop template editor for a desktop application, to generate beautiful reports, and found almost nothing to do that easily. Then I found grapejs, and I am considering using the Qt WebEngine and have grapejs embedded in my application.

I may have a web-based version of my application in 1-2 years, so that could be a better long-term solution.

But I will also need to properly print the documents with headers and footers, and manage height and width more like a "paper" document editor.

Is my idea a bad idea? Is there a better framework for what I am trying to do? I searched and found nothing without having to build everything from scratch.

Ju99ernaut commented 4 years ago

I think grapesjs would be perfect for your use case. Here #2724 it's probably being used in the same context.

math-artist commented 4 years ago

Ok, that seems like the right solution to manage a long list or table.

Is there a way to lock the height of the web page and see the layout limit while editing? My plan is to create 3 or 4 pages with the same footer and insert variable tags in the layout to fill those pages dynamically.

Ju99ernaut commented 4 years ago

For pages that's a matter of creating a page block with height defined. As for variable tags, those can be included in the block as well.

artf commented 4 years ago

@math-artist check the DeviceManager API where you can use a custom height for the canvas preview