| 1916 | | |
| 1917 | | // if we have multiple editors some bug in Mozilla makes some lose editing ability |
| 1918 | | HTMLArea._addEvents |
| 1919 | | ( |
| 1920 | | doc, |
| 1921 | | ["mousedown"], |
| 1922 | | function() { editor.activateEditor(); return true; } |
| | 1916 | |
| | 1917 | editor.whenDocReady( |
| | 1918 | function() { |
| | 1919 | // if we have multiple editors some bug in Mozilla makes some lose editing ability |
| | 1920 | HTMLArea._addEvents |
| | 1921 | ( |
| | 1922 | doc, |
| | 1923 | ["mousedown"], |
| | 1924 | function() { editor.activateEditor(); return true; } |
| | 1925 | ); |
| | 1926 | |
| | 1927 | |
| | 1928 | // intercept some events; for updating the toolbar & keyboard handlers |
| | 1929 | HTMLArea._addEvents |
| | 1930 | (doc, ["keydown", "keypress", "mousedown", "mouseup", "drag"], |
| | 1931 | function (event) { |
| | 1932 | return editor._editorEvent(HTMLArea.is_ie ? editor._iframe.contentWindow.event : event); |
| | 1933 | }); |
| | 1934 | |
| | 1935 | // check if any plugins have registered refresh handlers |
| | 1936 | for (var i in editor.plugins) { |
| | 1937 | var plugin = editor.plugins[i].instance; |
| | 1938 | HTMLArea.refreshPlugin(plugin); |
| | 1939 | } |
| | 1940 | |
| | 1941 | // specific editor initialization |
| | 1942 | if(typeof editor._onGenerate == "function") { |
| | 1943 | editor._onGenerate(); |
| | 1944 | } |
| | 1945 | } |
| 1924 | | |
| 1925 | | |
| 1926 | | // intercept some events; for updating the toolbar & keyboard handlers |
| 1927 | | HTMLArea._addEvents |
| 1928 | | (doc, ["keydown", "keypress", "mousedown", "mouseup", "drag"], |
| 1929 | | function (event) { |
| 1930 | | return editor._editorEvent(HTMLArea.is_ie ? editor._iframe.contentWindow.event : event); |
| 1931 | | }); |
| 1932 | | |
| 1933 | | // check if any plugins have registered refresh handlers |
| 1934 | | for (var i in editor.plugins) { |
| 1935 | | var plugin = editor.plugins[i].instance; |
| 1936 | | HTMLArea.refreshPlugin(plugin); |
| 1937 | | } |
| 1938 | | |
| 1939 | | // specific editor initialization |
| 1940 | | if(typeof editor._onGenerate == "function") { |
| 1941 | | editor._onGenerate(); |
| 1942 | | } |
| | 1947 | |