|
@@ -71,20 +71,42 @@
|
|
|
</form>
|
|
|
<script src="../../../../../ckeditor5/packages/ckeditor5-build-classic/build/translations/zh-cn.js"></script>
|
|
|
<script src="../../../../../ckeditor5/packages/ckeditor5-build-classic/build/ckeditor.js"></script>
|
|
|
-<script>
|
|
|
+<!--<script type="module"> import { ImportWord } from '../../../../../ckeditor5/packages/ckeditorckeditor5-import-word/package.json';</script>-->
|
|
|
+<script type="module">
|
|
|
+ // import { ImportWord } from '../../../../../ckeditor5/packages/ckeditor5-build-classic/node_modules/@ckeditor/ckeditor5-import-word';
|
|
|
var editor
|
|
|
+
|
|
|
ClassicEditor.create( document.querySelector( 'textarea' ),{
|
|
|
+ // plugins: [ ImportWord, /* ... */ ],
|
|
|
+ // importWord: {
|
|
|
+ // tokenUrl: 'https://98165.cke-cs.com/token/dev/8b7e0fb5d4569ec900b74e38f318447763b92a20980d7a4c0fcda5dfd2b4?limit=10'
|
|
|
+ // },
|
|
|
ckfinder: {
|
|
|
uploadUrl: ' ../../../../../api/common/editor_upload?command=QuickUpload&type=Files&responseType=json',
|
|
|
},
|
|
|
+ fontSize: {
|
|
|
+ options: [
|
|
|
+ 9,
|
|
|
+ 11,
|
|
|
+ 13,
|
|
|
+ 'default',
|
|
|
+ 17,
|
|
|
+ 19,
|
|
|
+ 21,
|
|
|
+ 26,
|
|
|
+ 32,
|
|
|
+ 40
|
|
|
+ ]
|
|
|
+ },
|
|
|
toolbar: {
|
|
|
items: [
|
|
|
+ // 'importWord',
|
|
|
+ 'FontSize','FontColor','FontBackgroundColor','FontFamily','highlight','|',
|
|
|
'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',
|
|
|
|
|
@@ -159,9 +181,11 @@
|
|
|
} )
|
|
|
.then( editor => {
|
|
|
window.editor = editor;
|
|
|
+ // editor.execute('fontSize', { value: '15px' }); //字体大小设置
|
|
|
+ // editor.execute('alignment', { value: 'left' }); //字体左右中对齐
|
|
|
} )
|
|
|
.catch( error => {
|
|
|
console.error( 'There was a problem initializing the editor.', error );
|
|
|
} );
|
|
|
// editor.setData( 123 );
|
|
|
-</script>
|
|
|
+</script>
|