@myissue/vue-website-page-builder 3.4.78 → 3.4.80
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 +37 -13
- package/dist/style.css +1 -1
- package/dist/vue-website-page-builder.js +5298 -5235
- package/dist/vue-website-page-builder.umd.cjs +37 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
- [Rendering HTML Output in Other Frameworks (React, Nuxt, etc.)](#rendering-html-output-in-other-frameworks-react-nuxt-etc)
|
|
33
33
|
- [Providing Configuration to the Page Builder](#providing-configuration-to-the-page-builder)
|
|
34
34
|
- [Comprehensive Language Support in the Page Builder](#comprehensive-language-support-in-the-page-builder)
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
- [Default language](#default-language)
|
|
36
|
+
- [Disabling the Language Dropdown](#disabling-the-language-dropdown)
|
|
37
37
|
- [Local Storage \& Auto-Save](#local-storage--auto-save)
|
|
38
38
|
- [Retrieving the Latest HTML Content for Form Submission](#retrieving-the-latest-html-content-for-form-submission)
|
|
39
39
|
- [Resetting the Builder After Successful Resource Creation or Update](#resetting-the-builder-after-successful-resource-creation-or-update)
|
|
40
40
|
- [Loading Existing Content or Components into the Page Builder](#loading-existing-content-or-components-into-the-page-builder)
|
|
41
41
|
- [Restoring Full Page Content (Global Styles \& Components)](#restoring-full-page-content-global-styles--components)
|
|
42
42
|
- [Automatic Draft Recovery](#automatic-draft-recovery)
|
|
43
|
-
- [
|
|
44
|
-
- [Publish Button](#publish-button)
|
|
43
|
+
- [Close Page Builder Without Saving in a Modal or Dialog](#close-page-builder-without-saving-in-a-modal-or-dialog)
|
|
44
|
+
- [Publish Changes Using the Save Button](#publish-changes-using-the-save-button)
|
|
45
45
|
- [Styling the Main Page Builder Container](#styling-the-main-page-builder-container)
|
|
46
46
|
- [Download HTML File](#download-html-file)
|
|
47
47
|
- [Custom Components](#custom-components)
|
|
@@ -471,7 +471,7 @@ Your `configPageBuilder` object can include:
|
|
|
471
471
|
```vue
|
|
472
472
|
<script setup>
|
|
473
473
|
import { onMounted } from 'vue'
|
|
474
|
-
import { getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
474
|
+
import { PageBuilder, getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
475
475
|
|
|
476
476
|
const configPageBuilder = {
|
|
477
477
|
updateOrCreate: {
|
|
@@ -660,7 +660,7 @@ If you have previously saved or published HTML content (for example, from your d
|
|
|
660
660
|
```vue
|
|
661
661
|
<script setup>
|
|
662
662
|
import { onMounted } from 'vue'
|
|
663
|
-
import { getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
663
|
+
import { PageBuilder, getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
664
664
|
|
|
665
665
|
// Retrieve the Page Builder service instance
|
|
666
666
|
const pageBuilderService = getPageBuilder()
|
|
@@ -713,7 +713,7 @@ If a draft is found, users are prompted to either continue where they left off o
|
|
|
713
713
|
```vue
|
|
714
714
|
<script setup>
|
|
715
715
|
import { onMounted } from 'vue'
|
|
716
|
-
import { getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
716
|
+
import { PageBuilder, getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
717
717
|
|
|
718
718
|
const configPageBuilder = {
|
|
719
719
|
updateOrCreate: {
|
|
@@ -736,20 +736,35 @@ onMounted(async () => {
|
|
|
736
736
|
</template>
|
|
737
737
|
```
|
|
738
738
|
|
|
739
|
-
##
|
|
739
|
+
## Close Page Builder Without Saving in a Modal or Dialog
|
|
740
740
|
|
|
741
741
|
You can easily use the Page Builder inside a modal or dialog.
|
|
742
|
-
To allow users to close the modal from inside the builder, use the `showCloseButton` prop and listen for the `@handleClosePageBuilder` event:
|
|
742
|
+
To close the page builder without saving, or to allow users to close the modal from inside the builder, use the `showCloseButton` prop and listen for the `@handleClosePageBuilder` event:
|
|
743
743
|
|
|
744
744
|
```vue
|
|
745
745
|
<script setup>
|
|
746
|
-
import { ref } from 'vue'
|
|
747
|
-
import { PageBuilder } from '@myissue/vue-website-page-builder'
|
|
746
|
+
import { onMounted, ref } from 'vue'
|
|
747
|
+
import { PageBuilder, getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
748
748
|
|
|
749
|
+
const configPageBuilder = {
|
|
750
|
+
updateOrCreate: {
|
|
751
|
+
formType: 'update',
|
|
752
|
+
formName: 'article',
|
|
753
|
+
},
|
|
754
|
+
}
|
|
749
755
|
const showModal = ref(true)
|
|
756
|
+
|
|
750
757
|
function closePageBuilder() {
|
|
751
758
|
showModal.value = false
|
|
752
759
|
}
|
|
760
|
+
|
|
761
|
+
const pageBuilderService = getPageBuilder()
|
|
762
|
+
|
|
763
|
+
// Initialize the Page Builder with `onMounted`
|
|
764
|
+
onMounted(async () => {
|
|
765
|
+
const result = await pageBuilderService.startBuilder(configPageBuilder)
|
|
766
|
+
console.info('You may inspect this result for message, status, or error:', result)
|
|
767
|
+
})
|
|
753
768
|
</script>
|
|
754
769
|
|
|
755
770
|
<template>
|
|
@@ -759,7 +774,7 @@ function closePageBuilder() {
|
|
|
759
774
|
</template>
|
|
760
775
|
```
|
|
761
776
|
|
|
762
|
-
## Publish Button
|
|
777
|
+
## Publish Changes Using the Save Button
|
|
763
778
|
|
|
764
779
|
To allow users to use the Publish button from inside the builder, use the `showPublishButton` prop and listen for the `@handlePublishPageBuilder` event.
|
|
765
780
|
|
|
@@ -768,7 +783,8 @@ To allow users to use the Publish button from inside the builder, use the `showP
|
|
|
768
783
|
|
|
769
784
|
```vue
|
|
770
785
|
<script setup>
|
|
771
|
-
import {
|
|
786
|
+
import { onMounted } from 'vue'
|
|
787
|
+
import { PageBuilder, getPageBuilder } from '@myissue/vue-website-page-builder'
|
|
772
788
|
|
|
773
789
|
const pageBuilderService = getPageBuilder()
|
|
774
790
|
|
|
@@ -778,6 +794,14 @@ const handlePublish = () => {
|
|
|
778
794
|
// Submit, publish, or process the content as needed
|
|
779
795
|
// e.g., send latestHtml to your API or update your form
|
|
780
796
|
}
|
|
797
|
+
|
|
798
|
+
const pageBuilderService = getPageBuilder()
|
|
799
|
+
|
|
800
|
+
// Initialize the Page Builder with `onMounted`
|
|
801
|
+
onMounted(async () => {
|
|
802
|
+
const result = await pageBuilderService.startBuilder(configPageBuilder)
|
|
803
|
+
console.info('You may inspect this result for message, status, or error:', result)
|
|
804
|
+
})
|
|
781
805
|
</script>
|
|
782
806
|
|
|
783
807
|
<template>
|