@myissue/vue-website-page-builder 3.5.11 → 3.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -3
- package/dist/services/PageBuilderService.d.ts +12 -15
- package/dist/style.css +1 -1
- package/dist/vue-website-page-builder.js +5376 -5391
- package/dist/vue-website-page-builder.umd.cjs +95 -95
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
- [Free Click \& Drop Page Builder](#free-click--drop-page-builder)
|
|
8
8
|
- [Demo](#demo)
|
|
9
9
|
- [Guide \& Documentation](#guide--documentation)
|
|
10
|
+
- [Backend and CMS Integration](#backend-and-cms-integration)
|
|
11
|
+
- [Why Choose This Vue Page Builder](#why-choose-this-vue-page-builder)
|
|
10
12
|
- [Overview](#overview)
|
|
11
13
|
- [Get Started in Minutes](#get-started-in-minutes)
|
|
12
14
|
- [About](#about)
|
|
@@ -45,6 +47,69 @@ This section covers installation, requirements, quick start, advanced usage, and
|
|
|
45
47
|
|
|
46
48
|
[Open Guides & Docs](https://myissue-studio.github.io/vue-website-page-builder/)
|
|
47
49
|
|
|
50
|
+
## Backend and CMS Integration
|
|
51
|
+
|
|
52
|
+
This Vue page builder is designed for real CMS, SaaS, marketplace, blog, job board, listing, and ecommerce admin workflows. The editor uses browser local storage for draft recovery and autosave, but production persistence belongs to your backend.
|
|
53
|
+
|
|
54
|
+
Recommended production flow:
|
|
55
|
+
|
|
56
|
+
1. Start the builder with your config:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
await pageBuilderService.startBuilder(configPageBuilder)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
2. Save the full page HTML to your backend:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
const content = pageBuilderService.getSavedPageHtml()
|
|
66
|
+
await api.updatePost(post.id, { content })
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. Edit existing backend content later:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
const { components, pageSettings } = pageBuilderService.parsePageBuilderHTML(post.content)
|
|
73
|
+
|
|
74
|
+
await pageBuilderService.startBuilder(
|
|
75
|
+
{
|
|
76
|
+
...configPageBuilder,
|
|
77
|
+
updateOrCreate: {
|
|
78
|
+
formType: 'update',
|
|
79
|
+
formName: 'article',
|
|
80
|
+
},
|
|
81
|
+
pageSettings,
|
|
82
|
+
},
|
|
83
|
+
components,
|
|
84
|
+
)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Store the complete HTML string, including the outer `#pagebuilder` wrapper:
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<div id="pagebuilder" class="pbx-bg-red-500" style="letter-spacing: 2px;">
|
|
91
|
+
<section data-component-title="Hero">...</section>
|
|
92
|
+
<section data-component-title="Content">...</section>
|
|
93
|
+
</div>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The wrapper stores global page styles. The sections store editable components. This makes the builder easy to use with Laravel, Rails, Django, Express, Nuxt, headless CMS platforms, custom admin panels, and any API-backed product.
|
|
97
|
+
|
|
98
|
+
## Why Choose This Vue Page Builder
|
|
99
|
+
|
|
100
|
+
Many page builders are heavy, opinionated, or tied to one CMS. This project focuses on a different use case: a lightweight Vue 3 page builder that you can embed inside your own product, connect to your own backend, and style for your own brand.
|
|
101
|
+
|
|
102
|
+
- **Backend-first persistence**: local storage is used for draft recovery, while your database stores the published full HTML.
|
|
103
|
+
- **Portable HTML output**: saved content is standard HTML with a `#pagebuilder` wrapper and direct `<section>` children.
|
|
104
|
+
- **Works with existing systems**: integrate with custom CMS dashboards, SaaS admin panels, marketplaces, job boards, blogs, and ecommerce content tools.
|
|
105
|
+
- **Vue-native integration**: use the `PageBuilder` component and `getPageBuilder()` service directly in Vue or Nuxt projects.
|
|
106
|
+
- **Bring your own media library**: inject your own media picker, storage URLs, and upload flow instead of being locked into one asset provider.
|
|
107
|
+
- **Global page styles included**: `pageSettings` can be saved and restored with the page, so editing existing posts keeps fonts, colors, backgrounds, and spacing.
|
|
108
|
+
- **No Tailwind setup required**: the package ships the needed prefixed styles and avoids class conflicts with your app.
|
|
109
|
+
- **Open and customizable**: MIT licensed, component-driven, and practical for teams that need control over the editing experience.
|
|
110
|
+
|
|
111
|
+
This is a general-purpose builder by design. It does not try to replace your backend, authentication, permissions, CDN, or publishing workflow. It gives your product a visual editor while letting your platform stay in charge of data, scale, security, and deployment.
|
|
112
|
+
|
|
48
113
|
## Overview
|
|
49
114
|
|
|
50
115
|
If you're a Vue 3 developer, this builder feels right at home. It installs quickly via npm and supports full customization through props and configuration objects. You can even set specific user settings like image, name, theme, language, company logo, and autosave preferences, making it a personalized experience for every user.
|
|
@@ -161,7 +226,7 @@ The Page Builder is packed with features:
|
|
|
161
226
|
- **True Visual Editing**: See your changes in real-time as you make them.
|
|
162
227
|
- **Media Library**: Easily inject your own custom media library component.
|
|
163
228
|
- **Advanced Sliders & Carousels**: Build responsive image and content sliders with autoplay, navigation controls, touch support, and full customization options.
|
|
164
|
-
- **
|
|
229
|
+
- **Draft Recovery & Auto-Save**: Never lose in-progress work—changes are saved locally as a draft while your backend stores published HTML.
|
|
165
230
|
- **Unsplash**: Unsplash integration.
|
|
166
231
|
- **Responsive Editing**: Ensure your site looks great on all devices.
|
|
167
232
|
- **Text Editing**: Edit text content live and in real-time.
|
|
@@ -216,8 +281,7 @@ If you discover a security vulnerability, please send us a message.
|
|
|
216
281
|
|
|
217
282
|
If you have any questions or if you're looking for customization, feel free to connect with our developers.
|
|
218
283
|
|
|
219
|
-
- [
|
|
220
|
-
- [LinkedIn](https://www.linkedin.com/in/qaiswardag)
|
|
284
|
+
- [Contact](https://mybuilder.dev)
|
|
221
285
|
|
|
222
286
|
## Report Issues or Request Features
|
|
223
287
|
|
|
@@ -121,9 +121,8 @@ export declare class PageBuilderService {
|
|
|
121
121
|
*/
|
|
122
122
|
globalPageStyles(): Promise<void>;
|
|
123
123
|
/**
|
|
124
|
-
* Disconnects the MutationObserver that
|
|
125
|
-
*
|
|
126
|
-
* styles editor panel.
|
|
124
|
+
* Disconnects the MutationObserver that tracks global page style changes.
|
|
125
|
+
* Call when closing the global styles editor panel.
|
|
127
126
|
*/
|
|
128
127
|
stopGlobalStylesSync(): void;
|
|
129
128
|
/**
|
|
@@ -184,13 +183,12 @@ export declare class PageBuilderService {
|
|
|
184
183
|
selectedComponentIsFullWidth(): boolean;
|
|
185
184
|
setSelectedComponentFullWidth(enabled: boolean): Promise<void>;
|
|
186
185
|
/**
|
|
187
|
-
* Returns true when the global page wrapper
|
|
188
|
-
* has the full-width class applied, meaning every section's background stretches edge-to-edge.
|
|
186
|
+
* Returns true when the global page wrapper has the full-width class applied.
|
|
189
187
|
*/
|
|
190
188
|
isGlobalFullWidth(): boolean;
|
|
191
189
|
/**
|
|
192
|
-
* Toggles the full-width class on
|
|
193
|
-
*
|
|
190
|
+
* Toggles the full-width class on the page wrapper so that global background
|
|
191
|
+
* colours stretch across the entire browser viewport.
|
|
194
192
|
*/
|
|
195
193
|
setGlobalFullWidth(enabled: boolean): Promise<void>;
|
|
196
194
|
/** Returns true when the currently selected element is an `<img>`. */
|
|
@@ -531,25 +529,24 @@ export declare class PageBuilderService {
|
|
|
531
529
|
private removeCurrentComponentsFromLocalStorage;
|
|
532
530
|
/**
|
|
533
531
|
* Handles the form submission process, clearing local storage and the DOM.
|
|
534
|
-
* Global page settings (classes / inline styles on the
|
|
532
|
+
* Global page settings (classes / inline styles on the page wrapper) are
|
|
535
533
|
* intentionally preserved so they survive a "remove all components" action.
|
|
536
534
|
* @returns {Promise<void>}
|
|
537
535
|
*/
|
|
538
536
|
handleFormSubmission(): Promise<void>;
|
|
539
537
|
/**
|
|
540
538
|
* Reads the current page settings.
|
|
541
|
-
* Prioritises the live
|
|
542
|
-
* if there are no [data-pagebuilder-content] elements.
|
|
539
|
+
* Prioritises the live #pagebuilder element (always current) and falls back to localStorage.
|
|
543
540
|
*/
|
|
544
541
|
private readCurrentPageSettings;
|
|
545
|
-
/** Applies captured global page classes/styles to
|
|
546
|
-
private
|
|
547
|
-
/** Reconnects the global-styles MutationObserver after a Vue remount replaces
|
|
542
|
+
/** Applies captured global page classes/styles to the page wrapper once. */
|
|
543
|
+
private applyPageSettingsToPage;
|
|
544
|
+
/** Reconnects the global-styles MutationObserver after a Vue remount replaces nodes. */
|
|
548
545
|
private reconnectGlobalStylesObserver;
|
|
549
546
|
/**
|
|
550
547
|
* Updates the component store and re-renders the page without losing global page
|
|
551
|
-
* styles on
|
|
552
|
-
*
|
|
548
|
+
* styles on #pagebuilder. Settings must be captured before the remount and
|
|
549
|
+
* re-applied after Vue renders.
|
|
553
550
|
*/
|
|
554
551
|
private setComponentsPreservingPageSettings;
|
|
555
552
|
/**
|