yuesu/Editors/tiny_mce3.5/plugins/fullscreen/editor_plugin_src.js

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	var DOM = tinymce.DOM;

	// State Transfer function
	var transferState = function(oldEditor, newEditor, bookmark) {
		var transferColorButtonState = function(swapme) {
			var c = oldEditor.controlManager.get(swapme);
			var newC = newEditor.controlManager.get(swapme);

			if (c && newC) {
				newC.displayColor(c.value);
			}

		};

		transferColorButtonState('forecolor');
		transferColorButtonState('backcolor');
		newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'});
		newEditor.selection.moveToBookmark(bookmark);

		if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) {
			newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang);
		}
	};

	tinymce.create('tinymce.plugins.FullScreenPlugin', {
		init : function(ed, url) {
			var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark;

			// Register commands
			ed.addCommand('mceFullScreen', function() {
				var win, oed;

				if (ed.getParam('fullscreen_is_enabled')) {
					if (ed.getParam('fullscreen_new_window'))
						closeFullscreen(); // Call to close in fullscreen.htm
					else {
						DOM.win.setTimeout(function() {
							var fullscreenEditor = ed;

							// find the editor that opened this one, execute restore function there
							var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id'));
							originalEditor.plugins.fullscreen.saveState(fullscreenEditor);

							tinyMCE.remove(fullscreenEditor);
						}, 10);
					}

					return;
				}
后面还有 174 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。