mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Fix TinyMCE plugings config [SCI-3679]
This commit is contained in:
parent
eaf9d59819
commit
f3849e2ece
1 changed files with 4 additions and 1 deletions
5
app/assets/javascripts/sitewide/tiny_mce.js
vendored
5
app/assets/javascripts/sitewide/tiny_mce.js
vendored
|
@ -21,6 +21,7 @@ var TinyMCE = (function() {
|
|||
init: function(selector, onSaveCallback) {
|
||||
var tinyMceContainer;
|
||||
var tinyMceInitSize;
|
||||
var plugins;
|
||||
if (typeof tinyMCE !== 'undefined') {
|
||||
// Hide element containing HTML view of RTE field
|
||||
tinyMceContainer = $(selector).closest('form').find('.tinymce-view');
|
||||
|
@ -28,6 +29,8 @@ var TinyMCE = (function() {
|
|||
$(selector).closest('.form-group')
|
||||
.before('<div class="tinymce-placeholder" style="height:' + tinyMceInitSize + 'px"></div>');
|
||||
tinyMceContainer.addClass('hidden');
|
||||
plugins = 'autosave autoresize customimageuploader link advlist codesample autolink lists charmap hr anchor searchreplace wordcount visualblocks visualchars insertdatetime nonbreaking save directionality paste textcolor colorpicker textpattern placeholder';
|
||||
if (typeof (MarvinJsEditor) !== 'undefined') plugins += ' marvinjsplugin';
|
||||
|
||||
|
||||
tinyMCE.init({
|
||||
|
@ -35,7 +38,7 @@ var TinyMCE = (function() {
|
|||
selector: selector,
|
||||
menubar: 'file edit view insert format',
|
||||
toolbar: 'undo redo restoredraft | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | forecolor backcolor | customimageuploader | codesample',
|
||||
plugins: 'autosave autoresize customimageuploader link advlist codesample autolink lists charmap hr anchor searchreplace wordcount visualblocks visualchars insertdatetime nonbreaking save directionality paste textcolor placeholder colorpicker textpattern',
|
||||
plugins: plugins,
|
||||
autoresize_bottom_margin: 20,
|
||||
codesample_languages: [
|
||||
{ text: 'R', value: 'r' },
|
||||
|
|
Loading…
Reference in a new issue