web文件管理器java,Web文件管理器CKeditor Spring MVC项目

有一个名为TinyMCE的开源项目它支持许多选项 . 我在我的Spring MVC项目中使用它,它运行良好 .

此代码用于修改文本编辑器:

tinymce.init({

/* replace textarea having class .tinymce with tinymce editor */

selector: "#mytextarea",

/* theme of the editor */

theme: "modern",

skin: "lightgray",

/* width and height of the editor */

width: "auto",

height: 200,

/* display statusbar */

statubar: true,

/* hide menubar */

menubar: false,

/* plugin */

plugins: [

"advlist autolink link image lists charmap preview hr anchor pagebreak",

"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",

"save table contextmenu directionality emoticons template paste textcolor codesample spellchecker"

],

/* toolbar */

toolbar: "insertfile undo redo | styleselect | bold italic | link image | codesample | preview media fullpage | backcolor emoticons spellchecker",

/*set spell_checker language*/

spellchecker_language: 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,' + 'German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv',

code_dialog_width: 700,

/* style */

style_formats: [

{title: "Headers", items: [

{title: "Header 1", format: "h1"},

{title: "Header 2", format: "h2"},

{title: "Header 3", format: "h3"},

{title: "Header 4", format: "h4"},

{title: "Header 5", format: "h5"},

{title: "Header 6", format: "h6"}

]},

{title: "Inline", items: [

{title: "Bold", icon: "bold", format: "bold"},

{title: "Italic", icon: "italic", format: "italic"},

{title: "Underline", icon: "underline", format: "underline"},

{title: "Strikethrough", icon: "strikethrough", format: "strikethrough"},

{title: "Superscript", icon: "superscript", format: "superscript"},

{title: "Subscript", icon: "subscript", format: "subscript"},

{title: "Code", icon: "code", format: "code"}

]},

{title: "Blocks", items: [

{title: "Paragraph", format: "p"},

{title: "Blockquote", format: "blockquote"},

{title: "Div", format: "div"},

{title: "Pre", format: "pre"}

]},

{title: "Alignment", items: [

{title: "Left", icon: "alignleft", format: "alignleft"},

{title: "Center", icon: "aligncenter", format: "aligncenter"},

{title: "Right", icon: "alignright", format: "alignright"},

{title: "Justify", icon: "alignjustify", format: "alignjustify"}

]}

]

});

在您的视图页面中使用cdn链接:

Write your answer here!

有关更多选项和信息,请访问TinyMCE我希望这对您有所帮助 .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值