InnoGears/ig-pagebuilder — pull request #2 by jorpan (2014-05-05 17:34:55+00:00)
Title: fixed error when HTML editor (not TinyMCE) is the current view

Throws error when HTML editor is the current view then switched to Page builder, which will result in having an empty content in Page builder mode and consequently erase the entire post content when saved.

This fix will check if TinyMCE is loaded, and if tinymce.get('content') is not null before accessing .getContent(). If tinymce.get('content') is null, it won't fire an error and will get the proper value of the textarea (#content).