includes/clientside/tinymce/plugins/preview/editor_plugin_src.js
author Dan
Fri, 15 May 2009 15:56:10 -0400
changeset 985 4ecf46e5eeab
parent 778 57ce13805b6f
child 1193 e3b94bd055dc
permissions -rw-r--r--
Fixed undefined indices for user_extra in various places
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     1
/**
778
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
     2
 * $Id: editor_plugin_src.js 895 2008-07-10 14:34:23Z spocke $
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     3
 *
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     4
 * @author Moxiecode
395
fa4c5ecb7c9a Fixed splitting bug (really the same issue from stable) in get_pageid_from_url(); upgraded TinyMCE to version 3.0-stable
Dan
parents: 335
diff changeset
     5
 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     6
 */
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
     7
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
     8
(function() {
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
     9
	tinymce.create('tinymce.plugins.Preview', {
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    10
		init : function(ed, url) {
778
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    11
			var t = this, css = tinymce.explode(ed.settings.content_css);
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    12
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    13
			t.editor = ed;
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    14
778
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    15
			// Force absolute CSS urls	
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    16
			tinymce.each(css, function(u, k) {
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    17
				css[k] = ed.documentBaseURI.toAbsolute(u);
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    18
			});
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    19
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    20
			ed.addCommand('mcePreview', function() {
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    21
				ed.windowManager.open({
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    22
					file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"),
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    23
					width : parseInt(ed.getParam("plugin_preview_width", "550")),
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    24
					height : parseInt(ed.getParam("plugin_preview_height", "600")),
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    25
					resizable : "yes",
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    26
					scrollbars : "yes",
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    27
					popup_css : css.join(','),
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    28
					inline : ed.getParam("plugin_preview_inline", 1)
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    29
				}, {
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    30
					base : ed.documentBaseURI.getURI()
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    31
				});
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    32
			});
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 395
diff changeset
    33
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    34
			ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    35
		},
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    36
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    37
		getInfo : function() {
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    38
			return {
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    39
				longname : 'Preview',
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    40
				author : 'Moxiecode Systems AB',
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    41
				authorurl : 'http://tinymce.moxiecode.com',
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    42
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    43
				version : tinymce.majorVersion + "." + tinymce.minorVersion
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    44
			};
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    45
		}
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    46
	});
1
fe660c52c48f Adding /includes
dan@scribus.fuhry.local.fuhry.local
parents:
diff changeset
    47
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    48
	// Register plugin
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    49
	tinymce.PluginManager.add('preview', tinymce.plugins.Preview);
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents: 1
diff changeset
    50
})();