Apache-SdnFw
view release on metacpan or search on metacpan
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
cleanup : 1,
accessibility_focus : 1,
custom_shortcuts : 1,
custom_undo_redo_keyboard_shortcuts : 1,
custom_undo_redo_restore_selection : 1,
custom_undo_redo : 1,
doctype : tinymce.isIE6 ? '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' : '<!DOCTYPE>', // Use old doctype on IE 6 to avoid horizontal scroll
visual_table_class : 'mceItemTable',
visual : 1,
font_size_style_values : 'xx-small,x-small,small,medium,large,x-large,xx-large',
apply_source_formatting : 1,
directionality : 'ltr',
forced_root_block : 'p',
valid_elements : '@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|titl...
hidden_input : 1,
padd_empty_editor : 1,
render_ui : 1,
init_theme : 1,
force_p_newlines : 1,
indentation : '30px',
keep_styles : 1,
fix_table_elements : 1,
inline_styles : 1,
convert_fonts_to_spans : true
}, s);
t.documentBaseURI = new tinymce.util.URI(s.document_base_url || tinymce.documentBaseURL, {
base_uri : tinyMCE.baseURI
});
t.baseURI = tinymce.baseURI;
// Call setup
t.execCallback('setup', t);
},
render : function(nst) {
var t = this, s = t.settings, id = t.id, sl = tinymce.ScriptLoader;
// Page is not loaded yet, wait for it
if (!Event.domLoaded) {
Event.add(document, 'init', function() {
t.render();
});
return;
}
tinyMCE.settings = s;
// Element not found, then skip initialization
if (!t.getElement())
return;
// Is a iPad/iPhone, then skip initialization. We need to sniff here since the
// browser says it has contentEditable support but there is no visible caret
// We will remove this check ones Apple implements full contentEditable support
if (tinymce.isIDevice)
return;
// Add hidden input for non input elements inside form elements
if (!/TEXTAREA|INPUT/i.test(t.getElement().nodeName) && s.hidden_input && DOM.getParent(id, 'form'))
DOM.insertAfter(DOM.create('input', {type : 'hidden', name : id}), id);
if (tinymce.WindowManager)
t.windowManager = new tinymce.WindowManager(t);
if (s.encoding == 'xml') {
t.onGetContent.add(function(ed, o) {
if (o.save)
o.content = DOM.encode(o.content);
});
}
if (s.add_form_submit_trigger) {
t.onSubmit.addToTop(function() {
if (t.initialized) {
t.save();
t.isNotDirty = 1;
}
});
}
if (s.add_unload_trigger) {
t._beforeUnload = tinyMCE.onBeforeUnload.add(function() {
if (t.initialized && !t.destroyed && !t.isHidden())
t.save({format : 'raw', no_events : true});
});
}
tinymce.addUnload(t.destroy, t);
if (s.submit_patch) {
t.onBeforeRenderUI.add(function() {
var n = t.getElement().form;
if (!n)
return;
// Already patched
if (n._mceOldSubmit)
return;
// Check page uses id="submit" or name="submit" for it's submit button
if (!n.submit.nodeType && !n.submit.length) {
t.formElement = n;
n._mceOldSubmit = n.submit;
n.submit = function() {
// Save all instances
tinymce.triggerSave();
t.isNotDirty = 1;
return t.formElement._mceOldSubmit(t.formElement);
};
}
n = null;
});
}
// Load scripts
function loadScripts() {
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
// We must save before we hide so Safari doesn't crash
t.save();
DOM.hide(t.getContainer());
DOM.setStyle(t.id, 'display', t.orgDisplay);
},
isHidden : function() {
return !DOM.isHidden(this.id);
},
setProgressState : function(b, ti, o) {
this.onSetProgressState.dispatch(this, b, ti, o);
return b;
},
load : function(o) {
var t = this, e = t.getElement(), h;
if (e) {
o = o || {};
o.load = true;
// Double encode existing entities in the value
h = t.setContent(is(e.value) ? e.value : e.innerHTML, o);
o.element = e;
if (!o.no_events)
t.onLoadContent.dispatch(t, o);
o.element = e = null;
return h;
}
},
save : function(o) {
var t = this, e = t.getElement(), h, f;
if (!e || !t.initialized)
return;
o = o || {};
o.save = true;
// Add undo level will trigger onchange event
if (!o.no_events) {
t.undoManager.typing = 0;
t.undoManager.add();
}
o.element = e;
h = o.content = t.getContent(o);
if (!o.no_events)
t.onSaveContent.dispatch(t, o);
h = o.content;
if (!/TEXTAREA|INPUT/i.test(e.nodeName)) {
e.innerHTML = h;
// Update hidden form element
if (f = DOM.getParent(t.id, 'form')) {
each(f.elements, function(e) {
if (e.name == t.id) {
e.value = h;
return false;
}
});
}
} else
e.value = h;
o.element = e = null;
return h;
},
setContent : function(h, o) {
var t = this;
o = o || {};
o.format = o.format || 'html';
o.set = true;
o.content = h;
if (!o.no_events)
t.onBeforeSetContent.dispatch(t, o);
// Padd empty content in Gecko and Safari. Commands will otherwise fail on the content
// It will also be impossible to place the caret in the editor unless there is a BR element present
if (!tinymce.isIE && (h.length === 0 || /^\s+$/.test(h))) {
o.content = t.dom.setHTML(t.getBody(), '<br _mce_bogus="1" />');
o.format = 'raw';
}
o.content = t.dom.setHTML(t.getBody(), tinymce.trim(o.content));
if (o.format != 'raw' && t.settings.cleanup) {
o.getInner = true;
o.content = t.dom.setHTML(t.getBody(), t.serializer.serialize(t.getBody(), o));
}
if (!o.no_events)
t.onSetContent.dispatch(t, o);
return o.content;
},
getContent : function(o) {
var t = this, h;
o = o || {};
o.format = o.format || 'html';
o.get = true;
if (!o.no_events)
t.onBeforeGetContent.dispatch(t, o);
( run in 0.881 second using v1.01-cache-2.11-cpan-f56aa216473 )