moveInstanceTo()
Moves the Author API instance into the specified DOM element.
You would want to use this method so that you can re-render the visual elements in the browser and relocate the Author API instance, for example.
Examples
// Standard usage where the UI has been successfully moved
var element = document.getElementById('author-api-container');
var moveResult = authorApp.moveInstanceTo(element);
console.log(moveResult);
// Returns false where the target DOM element doesn't exist
var element = document.getElementById('non-existing-element');
var moveResult = authorApp.moveInstanceTo(element);
console.log(moveResult);
Arguments
-
element objectThe DOM element to append the Author API instance to.
Return value
booleanReturns true
if successful, or false
if unable to move the Author API instance to the provided element
.