Files
leanote-ios/Leanote/editor/EditorAssets/editor.min.html

51 lines
2.4 KiB
HTML
Executable File

<!DOCTYPE html><html><head><title>Leanote Rich Text Editor</title><meta name=viewport content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"><script src=all.js></script><script>
var callbackedAndLoggerInstantiated = false;
var callbacker = null;
var logger = null
function canLog() {
return (callbackedAndLoggerInstantiated
&& callbacker
&& logger);
}
window.onerror = function myErrorHandler(errorMsg, url, lineNumber) {
if (canLog()) {
logger.logError(errorMsg, url, lineNumber);
}
return false;
}
window.onload = function() {
// If the logger is not instantiated for any reason, we'll throw an alert to be loud
// and noisy about it. That is not supposed to happen at all.
//
if (!canLog()) {
alert("The callbacker and/or logger has failed to initialize. "
+ "This probably means there's a syntax error in one of the js sources.");
}
}
callbacker = new WPHybridCallbacker();
logger = new WPHybridLogger(callbacker, '~');
// If the classes above have errors that interrupt the execution of our javascript code
// this flag will never be set to true... this is useful for our function myErrorHandler
// to know that a noisy alert should be used instead of the logger
//
callbackedAndLoggerInstantiated = true;
// DRM: onLoad does not get called when offline, if there's remote content in the editor
// (such as remote images). We use the 'ready' event for this reason.
//
$(document).ready(function() {
ZSSEditor.init(callbacker, logger);
if (/ipad/.test(location)) {
ZSSEditor.getField('zss_field_title').setHTML("你好啊 hello world");
ZSSEditor.getField('zss_field_content').setHTML("你好 hello world");
$('body').addClass('ipad-body');
}
});
</script><link rel=stylesheet type=text/css href=editor.css></head><body><div contenteditable=false id=zss_field_title class=field nostyle></div><div contenteditable=false id=separatorDiv><hr></div><div contenteditable=false id=zss_field_content class=field></div></body></html>