Documentation

Editor

setTemplate #

Sets a template to the editor.

this.app.editor.setTemplate('template code');

getFrame #

Returns the editor iframe.

var $frame = this.app.editor.getFrame();

getDoc #

Returns the document object of editor iframe.

var $doc = this.app.editor.getDoc();

getWin #

Returns the window object of editor iframe.

var $win = this.app.editor.getWin();

getHead #

Returns the head tag of editor iframe.

var $head = this.app.editor.getHead();

getBody #

Returns the body tag of editor iframe.

var $body = this.app.editor.getBody();

getBodyInstance #

Returns the instance of body tag.

var instance = this.app.editor.getBodyInstance();

getHtml #

Arguments
tidy (optional) Boolean

Returns the html code of template.

var html = this.app.editor.getHtml();

If the tidy argument is enabled, it will return the formatted code of html.

var html = this.app.editor.getHtml(true);

getText #

Returns the email as a plaint text.

var text = this.app.editor.getText();

getTemplate #

Arguments
tidy (optional) Boolean

Returns the modified code of template.

var template = this.app.editor.getTemplate();

If the tidy argument is enabled, it will return the formatted code of template.

var template = this.app.editor.getTemplate(true);

getTemplateSource #

Arguments
tidy (optional) Boolean

Returns the initial code of template.

var template = this.app.editor.getTemplateSource();

If the tidy argument is enabled, it will return the formatted code of template.

var template = this.app.editor.getTemplateSource();

isSourceMode #

Checks if the editor in the source mode.

var is = this.app.editor.isSourceMode();

isMobileMode #

Checks if the editor in the mobile view mode.

var is = this.app.editor.isMobileMode();

setData #

Arguments
data Object

Sets properties to the body tag.

this.app.editor.setData({
    'background-color': '#fff'
});

getData #

Returns properties of the body tag.

var data = this.app.editor.getData();

adjustHeight #

Adjusts the height of the frame to the height of the content in it.

this.app.editor.adjustHeight();