1. 程式人生 > >jsp中文字外掛的呼叫

jsp中文字外掛的呼叫

文字外掛如下圖

jsp程式碼段:

<script type="text/javascript">
 $(document).ready(function () {
         $('#mycontent').bignote({
             height: 300,
             lang: 'zh-CN',
             toolbar: [
                 ['style', ['style', 'fontname', 'fontsize', 'color', 'bold', 'italic', 'underline', 'strikethrough', 'clear']],
                 ['layout', ['ul', 'ol', 'paragraph', 'height']],
                 ['misc', ['undo', 'redo']],
                 ['insert', ['picture', 'link', 'table', 'hr', 'help']]
             ],
             onImageUpload: function (files, editor, $editable) {
                 sendFile(files, editor, $editable, '#mycontent');
             }
         });
         $('#mycontent').code($("#contentStr").val());
     });
</script>

<form action="#" name="myForm" id="myForm" method="post">
<div style="clear: both;">
	<textarea id="mycontent" style="width:100%;height:85%;overflow:scroll"></textarea>
</div>
</form>