<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – classic editor build – development sample</title>
<style>
body {
max-width: 800px;
margin: 20px auto;
}
</style>
</head>
<body>
<h1>CKEditor 5 – classic editor build – development sample</h1>
<div id="editor">
<h2>Sample</h2>
<p>This is an instance of the <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">classic editor build</a>.</p>
<figure class="image">
<img src="tests/manual/sample.jpg" alt="Autumn fields" />
</figure>
<p>You can use this sample to validate whether your <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>
</div>
<h2 style="text-align:center"><a href="index35.html" target="_blank">ckfinder3.5</a></h2>
<script src="build/ckeditor.js"></script>
<script src="build/translations/zh-cn.js"></script>
<script>
ClassicEditor.create( document.querySelector( '#editor' ),{
toolbar: {
items: [
'sourceEditing',
'|','undo','redo',
'|','heading',
'|','findandReplace','alignment','bold','italic','underline','code',
'horizontalLine','removeformat','link','strikethrough','subscript','superscript','blockQuote','specialCharacters',
'|','FontSize','FontColor','FontBackgroundColor','FontFamily','highlight',
'|','numberedList','bulletedList','todoList','outdent','indent','pageBreak',
'|','insertImage','cKFinder','insertTable','mediaEmbed',
]
},
ckfinder: {
uploadUrl: 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json'
},
//设置字体
fontFamily: {
options: [
'default',
'Blackoak Std',
'宋体,SimSun',
'新宋体,NSimSun',
'微软雅黑,Microsoft YaHei',
'楷体_GB2312,KaiTi_GB2312',
'隶书,LiSu',
'幼园,YouYuan',
'华文细黑,STXihei',
]
},
image: {
styles: [
'full','alignLeft', 'alignCenter', 'alignRight'
],
resizeOptions: [
{
name: 'resizeImage:原尺寸',
label: '原尺寸',
value: null
},
{
name: 'resizeImage:25',
label: '25%',
value: '25'
},
{
name: 'resizeImage:50',
label: '50%',
value: '50'
},
{
name: 'resizeImage:75',
label: '75%',
value: '75'
}
],
toolbar: [
// 'imageStyle:full',
// 'imageStyle:side',
'imageStyle:alignLeft',
'imageStyle:alignCenter',
'imageStyle:alignRight',
'|',
'resizeImage',
'|',
'toggleImageCaption',
'imageTextAlternative',
'linkImage'
],
},
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells',
'tableCellProperties',
'tableProperties'
]
},
language: 'zh-cn'
} )
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( 'There was a problem initializing the editor.', error );
} );
</script>
</body>
</html>