You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
HTML
61 lines
1.3 KiB
HTML
6 years ago
|
<!DOCTYPE html><html lang="en">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>Editor</title>
|
||
|
<script src="/ckeditor/ckeditor.js"></script>
|
||
|
<script src="/ckeditor/ckfinder/ckfinder.js"></script>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
function getData()
|
||
|
{
|
||
|
document.getElementById("tmptext").value = CKEDITOR.instances.editor.getData();
|
||
|
}
|
||
|
|
||
|
function setData()
|
||
|
{
|
||
|
CKEDITOR.instances.editor.setData(document.getElementById("tmptext").value);
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
|
||
|
|
||
|
<p>
|
||
|
<textarea name="content" cols="160" rows="80" id="editor"></textarea>
|
||
|
</p>
|
||
|
|
||
|
<label>
|
||
|
<textarea name="tmptext" id="tmptext"> </textarea>
|
||
|
</label>
|
||
|
<p>
|
||
|
<input type="hidden" id="hiddenField" name="hiddenField" />
|
||
|
</p>
|
||
|
</form>
|
||
|
<script>var editor = CKEDITOR.replace("editor");
|
||
|
CKEDITOR.editorConfig = function( config ) {
|
||
|
//Define changes to default configuration here. For example:
|
||
|
config.enterMode = CKEDITOR.ENTER_BR;
|
||
|
//config.language = 'cn';
|
||
|
//config.uiColor = '#AADC6E';
|
||
|
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
CKEDITOR.instances.editor.on('instanceReady', function (e) {
|
||
|
CKEDITOR.instances.editor.execCommand('maximize'); // 初始最大化
|
||
|
});
|
||
|
|
||
|
</script>
|
||
|
|
||
|
|
||
|
<p> </p>
|
||
|
</body>
|
||
|
</html>
|