Days
Hours
Minutes
Seconds
x

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

Skip to content

Methods

getHTML ()

Returns: String

Get the HTML of the created page.

  • This method does not accept any arguments.

CODE EXAMPLES

Invoke the method inside the rich text editor:

// Initialize.
var page = new FroalaPages('selector-id');

// Call the method.
await page.getHTML();

getJSON ()

Returns: Object

Get the JSON of the created page.

  • This method does not accept any arguments.

CODE EXAMPLES

Invoke the method inside the rich text editor:

// Initialize.
var page = new FroalaPages('selector-id');

// Call the method.
await page.getJSON();

setHTML (html_string)

Returns: Void

Load a page.

  • html_string

    Type: String

    The HTML that was previously generated by the Froala Pages.

CODE EXAMPLES

Invoke the method inside the rich text editor:

// Initialize.
var page = new FroalaPages('selector-id');

// Call the method.
await page.setHTML('Page HTML.');

setJSON (json_string)

Returns: Void

Load the JSON.

  • json_string

    Type: String

    The JSON that was previously generated by the Froala Pages.

CODE EXAMPLES

Invoke the method inside the rich text editor:

// Initialize.
var page = new FroalaPages('selector-id');

// Call the method.
await page.setJSON('Page JSON.');
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.