- Timestamp:
- 10/10/2013 09:49:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
r23090 r25761 4 4 <title></title> 5 5 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 6 <script type="text/javascript" src="../../tiny_mce.js?ver=35 8-20121205"></script>6 <script type="text/javascript" src="../../tiny_mce.js?ver=359-20131010"></script> 7 7 <script type="text/javascript"> 8 8 function patchCallback(settings, key) { … … 47 47 48 48 settings.save_onsavecallback = function() { 49 window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});49 moveContent(); 50 50 window.opener.tinyMCE.get(oeID).execCommand('mceSave'); 51 51 window.close(); … … 57 57 58 58 function moveContent() { 59 window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent()); 59 // find the original editor, execute restore state in it's plugin instance 60 window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor); 61 62 // prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent() 63 tinymce.dom.Event.remove(window, "beforeunload", unloadHandler); 60 64 } 61 65 62 66 function closeFullscreen() { 63 moveContent();67 // moveContent() will be called by the unload handler 64 68 window.close(); 65 69 } … … 79 83 var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM; 80 84 81 e.value = window.opener.tinyMCE.get(oeID).getContent();82 83 85 vp = dom.getViewPort(); 84 86 settings.width = vp.w; 85 87 settings.height = vp.h - 15; 86 88 87 tinymce.dom.Event.add(window, 'resize', function() { 88 var vp = dom.getViewPort(); 89 settings.oninit = function() { 90 var ed = tinyMCE.activeEditor; 91 window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed); 89 92 90 tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h); 91 }); 93 tinymce.dom.Event.add(window, 'resize', function() { 94 var vp = dom.getViewPort(); 95 96 tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h); 97 }); 98 } 92 99 93 100 tinyMCE.init(settings);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)