CKEditor的对齐方式以及字体大小和字体名称不显示

时间:2019-03-05 19:36:25

标签: javascript asp.net-mvc razor ckeditor4.x

我在应用程序中使用CKEditor 4。由于某些原因,不显示对齐方式和字体名称和大小工具。我下载了完整版本的压缩文件,并将其放置在项目中的脚本下。 下面是我的代码。 如果将javascript路径替换为CDN路径,我会看到所有那些缺少的工具,但是当我添加本地路径时却找不到。有人可以告诉我我想念的是什么,我可能做错了什么吗?

<script src="~/Scripts/ckeditor/ckeditor.js"></script>

CKEDITOR.replace('editor1', {
			toolbarGroups: [
				{ name: 'document', groups: ['mode', 'document', 'doctools'] },
				{ name: 'clipboard', groups: ['clipboard', 'undo'] },
				{ name: 'editing', groups: ['find', 'selection', 'spellchecker'] },
				{ name: 'forms' },
				'/',
				{ name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
				{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'] },
				{ name: 'links' },
				{ name: 'insert' },
				'/',
				{ name: 'styles' },
				{ name: 'colors' },
				{ name: 'tools' },
				{ name: 'others' },
				{ name: 'about' }
			],
			toolbar: [
				{ name: 'clipboard', groups: ['clipboard', 'undo'], items: ['Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo'] },
				{ name: 'editing', groups: ['find', 'selection', 'spellchecker'], items: [ '-','Scayt'] },
				{ name: 'basicstyles', groups: ['basicstyles', 'cleanup'], items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-'] },
				{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'], items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
				{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
				{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
				{ name: 'tools', items: ['Maximize'] },
				{ name: 'others', items: ['-'] },
				{ name: 'about', items: ['About'] }
			],
			removeButtons: 'Anchor,Specialchar,Image,Table,Source,SpecialChar,About,Cut,Copy,Paste,PasteFromWord,Blockquote'
		});
<div>
        @Html.TextAreaFor(model => model.message, new { @id = "editor1", @name = "editor1", @class = "form-control " })
</div>

标有黄色的工具丢失。 enter image description here

0 个答案:

没有答案