增加下载微信公众号文章功能
This commit is contained in:
86
20220330_Vote/Ewide.Web.Entry/Views/WX/Index - 复制.cshtml
Normal file
86
20220330_Vote/Ewide.Web.Entry/Views/WX/Index - 复制.cshtml
Normal file
@@ -0,0 +1,86 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
|
||||
|
||||
<script src="/Contents/ckeditor5-build-decoupled-document-35.4.0/ckeditor5-build-decoupled-document/ckeditor.js" type="text/javascript"></script>
|
||||
<h1 class="title">@ViewBag.Title</h1>
|
||||
<div class="document-editor">
|
||||
<div class="toolbar-container"></div>
|
||||
<div class="content-container">
|
||||
<div id="editor">
|
||||
@Html.Raw(ViewBag.Detail)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
DecoupledEditor
|
||||
.create(document.querySelector('#editor'), {
|
||||
//toolbar: ['heading', '|', 'bold', 'italic', 'link']
|
||||
toolbar: ['undo', 'redo',
|
||||
'|',
|
||||
'exportPdf', 'exportWord', 'importWord',
|
||||
'|',
|
||||
'wproofreader', 'findAndReplace', 'selectAll',
|
||||
'|',
|
||||
'heading',
|
||||
'|',
|
||||
'removeFormat', 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript',
|
||||
'|',
|
||||
'specialCharacters', 'horizontalLine', 'pageBreak',
|
||||
'|',
|
||||
'-',
|
||||
'highlight', 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor',
|
||||
'|',
|
||||
'link', 'blockQuote', 'insertTable', 'uploadImage', 'ckbox', 'mediaEmbed', 'codeBlock', 'htmlEmbed',
|
||||
'|',
|
||||
'bulletedList', 'numberedList', 'todoList',
|
||||
'|',
|
||||
'outdent', 'indent', 'alignment',
|
||||
'|',
|
||||
'textPartLanguage',
|
||||
'|',
|
||||
'sourceEditing'],
|
||||
plugins: [
|
||||
Autoformat, BlockQuote, Bold, Heading, Image, ImageCaption,
|
||||
ImageStyle, ImageToolbar, Indent, Italic, Link, List, MediaEmbed,
|
||||
Paragraph, Table, TableToolbar, Alignment, AutoImage, AutoLink,
|
||||
CKBox, CloudServices, Code, CodeBlock, Essentials, ExportPdf,
|
||||
ExportWord, ImportWord, FindAndReplace, Font, Highlight, HorizontalLine,
|
||||
HtmlEmbed, ImageInsert, ImageResize, ImageUpload, IndentBlock,
|
||||
LinkImage, ListProperties, Mention, PageBreak, PasteFromOffice,
|
||||
PictureEditing, RemoveFormat, SourceEditing, SpecialCharacters,
|
||||
SpecialCharactersEssentials, Strikethrough, Subscript, Superscript,
|
||||
TableCaption, TableCellProperties, TableColumnResize,
|
||||
TableProperties, TextPartLanguage, TextTransformation, TodoList,
|
||||
Underline, WordCount, WProofreader
|
||||
],
|
||||
})
|
||||
.then(editor => {
|
||||
const toolbarContainer = document.querySelector('.toolbar-container');
|
||||
toolbarContainer.prepend(editor.ui.view.toolbar.element);
|
||||
window.editor = editor;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err.stack);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.document-editor {
|
||||
width: 667px;
|
||||
border: 1px solid #ccc;
|
||||
margin: 0 auto;
|
||||
margin-top: 30px
|
||||
}
|
||||
|
||||
.ck-editor__editable_inline {
|
||||
height: 700px !important;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 667px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user