mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
removed quill
This commit is contained in:
parent
65fa631b1c
commit
88d7cb200e
3 changed files with 4 additions and 29 deletions
|
@ -244,6 +244,7 @@ function formNewAjax($form) {
|
|||
expandStep($new_step);
|
||||
toggleButtons(true);
|
||||
|
||||
TinyMCE.init();
|
||||
//Rerender tables
|
||||
$new_step.find("div.step-result-hot-table").each(function() {
|
||||
$(this).handsontable("render");
|
||||
|
@ -260,6 +261,7 @@ function formNewAjax($form) {
|
|||
formCallback($form);
|
||||
formNewAjax($form);
|
||||
applyCancelOnNew();
|
||||
TinyMCE.destroyAll();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
|
||||
// Globally overwrite links handling in Quill rich text editor
|
||||
// var Link = Quill.import('formats/link');
|
||||
// Link.sanitize = function(url) {
|
||||
// if (url.includes('http:') || url.includes('https:')) {
|
||||
// return url;
|
||||
// }
|
||||
// return 'http://' + url;
|
||||
// };
|
||||
//
|
||||
// function openLinksInNewTab() {
|
||||
// _.each($('.ql-editor a'), function(el) {
|
||||
// if ($(el).attr('target') !== '_blank') {
|
||||
// $(el).attr('target', '_blank');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// $(document).ready(function(){
|
||||
// openLinksInNewTab();
|
||||
// });
|
9
app/assets/javascripts/sitewide/tiny_mce.js
vendored
9
app/assets/javascripts/sitewide/tiny_mce.js
vendored
|
@ -14,14 +14,10 @@ var TinyMCE = (function() {
|
|||
if (typeof tinyMCE != 'undefined') {
|
||||
tinyMCE.init({
|
||||
selector: "textarea.tinymce",
|
||||
toolbar: ["undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | print preview | forecolor backcolor emoticons | codesample"],
|
||||
plugins: "link,advlist,codesample,autolink,lists,link,charmap,print,preview,hr,anchor,pagebreak,searchreplace,wordcount,visualblocks,visualchars,code,fullscreen,insertdatetime,nonbreaking,save,table,contextmenu,directionality,emoticons,template,paste,textcolor,colorpicker,textpattern,imagetools,toc",
|
||||
toolbar: ["undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | print preview | forecolor backcolor | codesample"],
|
||||
plugins: "link,advlist,codesample,autolink,lists,link,charmap,print,preview,hr,anchor,pagebreak,searchreplace,wordcount,visualblocks,visualchars,code,fullscreen,insertdatetime,nonbreaking,save,table,contextmenu,directionality,paste,textcolor,colorpicker,textpattern,imagetools,toc",
|
||||
codesample_languages: [{"text":"R","value":"r"},{"text":"MATLAB","value":"matlab"},{"text":"Python","value":"python"},{"text":"JSON","value":"javascript"},{"text":"HTML/XML","value":"markup"},{"text":"JavaScript","value":"javascript"},{"text":"CSS","value":"css"},{"text":"PHP","value":"php"},{"text":"Ruby","value":"ruby"},{"text":"Java","value":"java"},{"text":"C","value":"c"},{"text":"C#","value":"csharp"},{"text":"C++","value":"cpp"}],
|
||||
init_instance_callback: function(editor) {
|
||||
|
||||
editor.on('init', function() {
|
||||
|
||||
});
|
||||
SmartAnnotation.init($(editor.contentDocument.activeElement));
|
||||
},
|
||||
setup: function(editor) {
|
||||
|
@ -30,7 +26,6 @@ var TinyMCE = (function() {
|
|||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue