paperculture/alchemy_cms — pull request #3 by wuservices (2014-05-01 07:52:20+00:00)
Title: Fix TinyMCE initialization for admin edit pages loaded with Turbolinks

TinyMCE settings are loaded in javascript_pre_init, however this was previously in

. Because Turbolinks is used, scripts in the

are only executed on the first page load or during a page refresh. Therefore, scripts that change on each page, need to be moved into

. To prevent executing shared libraries on each page load, data-turbolinks-eval=false is added to the main alchemy/alchemy javascript_include_tag. Alchemy.Tinymce must also not be overwritten if it's already assigned because ALchemy.Tinymce.init is defined in alchemy.tinymce.js.coffee which is only executed on the first page load.