Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

Skip to content

Save

Once a page is created, the next step would be to save it. For that, the Froala Pages has built-in method for getting the HTML of the newly created page. Below is a basic example of creating a custom button where we save the generated content.

<script>
FroalaPages.Button.Register('save', {
title: 'Save',
icon: {
type: 'html',
template: 'Save'
},
callback: function () {
// Display saved HTML.
console.log(await this.page.getHTML());
}
})

// Init pages.
new FroalaPages({
pageRightButtons: [
['save']
]
})
</script>

Save on the server

Once you get the HTML from the Froala Pages, we recommend to make an AJAX request over to your server and store the HTML so that you can load it back further on.

Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.