Labyrinth-Demo
view release on metacpan or search on metacpan
vhost/html/js/tiny_mce/tiny_mce_src.js view on Meta::CPAN
} else {
d.pop();
if (d.length && d[d.length - 1].close) {
a = a + '</' + d[d.length - 1].tag + '>';
d.pop();
}
}
} else {
// Ignore these
if (/^(br|hr|input|meta|img|link|param)$/i.test(c))
return a;
// Ignore closed ones
if (/\/>$/.test(a))
return a;
d.push({tag : c}); // Push start element
}
return a;
});
// End all open tags
for (i=d.length - 1; i>=0; i--)
s += '</' + d[i].tag + '>';
return s;
}
});
})();
/* file:jscripts/tiny_mce/classes/EditorCommands.js */
(function() {
var each = tinymce.each, isIE = tinymce.isIE, isGecko = tinymce.isGecko, isOpera = tinymce.isOpera, isWebKit = tinymce.isWebKit;
function isBlock(n) {
return /^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName);
};
tinymce.create('tinymce.EditorCommands', {
EditorCommands : function(ed) {
this.editor = ed;
},
execCommand : function(cmd, ui, val) {
var t = this, ed = t.editor, f;
switch (cmd) {
case 'Cut':
case 'Copy':
case 'Paste':
try {
ed.getDoc().execCommand(cmd, ui, val);
} catch (ex) {
if (isGecko) {
ed.windowManager.confirm(ed.getLang('clipboard_msg'), function(s) {
if (s)
window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', 'mceExternal');
});
} else
ed.windowManager.alert(ed.getLang('clipboard_no_support'));
}
return true;
// Ignore these
case 'mceResetDesignMode':
case 'mceBeginUndoLevel':
return true;
// Ignore these
case 'unlink':
t.UnLink();
return true;
// Bundle these together
case 'JustifyLeft':
case 'JustifyCenter':
case 'JustifyRight':
case 'JustifyFull':
t.mceJustify(cmd, cmd.substring(7).toLowerCase());
return true;
case 'mceEndUndoLevel':
case 'mceAddUndoLevel':
ed.undoManager.add();
return true;
default:
f = this[cmd];
if (f) {
f.call(this, ui, val);
return true;
}
}
return false;
},
Indent : function() {
var ed = this.editor, d = ed.dom, s = ed.selection, e, iv, iu;
// Setup indent level
iv = ed.settings.indentation;
iu = /[a-z%]+$/i.exec(iv);
iv = parseInt(iv);
if (ed.settings.inline_styles && (!this.queryStateInsertUnorderedList() && !this.queryStateInsertOrderedList())) {
each(this._getSelectedBlocks(), function(e) {
d.setStyle(e, 'paddingLeft', (parseInt(e.style.paddingLeft || 0) + iv) + iu);
});
return;
}
ed.getDoc().execCommand('Indent', false, null);
( run in 0.496 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )