Skip to content

Instantly share code, notes, and snippets.

@f0t0n
Created April 4, 2012 17:39
Show Gist options
  • Save f0t0n/2304163 to your computer and use it in GitHub Desktop.
Save f0t0n/2304163 to your computer and use it in GitHub Desktop.
lorem ipsum for chartus editor
$(document).on('chartusEditor.load', function() {
var paragraphsCount = 2,
loremIpsum = new goog.text.LoremIpsum();
loremParagraphs = [];
for(var i = 0; i < paragraphsCount; i++) {
loremParagraphs.push(
'<p>', loremIpsum.generateParagraph(), '</p><br />'
);
}
window.ChartusEditor.setHtml(
false,
goog.string.buildString.apply(this, loremParagraphs)
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment