forked from alohaeditor/Aloha-Editor
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathaloha-config.js
More file actions
91 lines (87 loc) · 2.62 KB
/
aloha-config.js
File metadata and controls
91 lines (87 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Generated by CoffeeScript 1.3.3
(function() {
this.Aloha = this.Aloha || {};
this.Aloha.settings = {
jQuery: this.jQuery,
logLevels: {
error: false,
warn: true,
info: false,
debug: false
},
requireConfig: {
paths: {
jqueryui: '../../oerpub/js/jquery-ui-1.9.0.custom-aloha'
}
},
errorhandling: true,
plugins: {
load: ['common/ui', 'oer/toolbar', 'oer/popover', 'oer/format', 'common/contenthandler', 'common/paste', 'common/block', 'common/list', 'oer/table', 'oer/popover', 'oer/math', 'extra/draganddropfiles', 'common/image', 'oer/assorted', 'oer/title', 'common/undo', 'oer/undobutton', 'oer/genericbutton', 'oer/semanticblock', 'oer/exercise', 'oer/note', 'oer/cnxmlplus-handler'],
note: [
{
label: 'Note',
cls: 'note',
hasTitle: true
}, {
label: 'Aside',
cls: 'note',
hasTitle: true,
type: 'aside'
}, {
label: 'Warning',
cls: 'note',
hasTitle: true,
type: 'warning'
}, {
label: 'Tip',
cls: 'note',
hasTitle: true,
type: 'tip'
}, {
label: 'Important',
cls: 'note',
hasTitle: true,
type: 'important'
}, {
label: 'Noteish',
cls: 'noteish',
hasTitle: true
}, {
label: 'Noteish (no Title)',
cls: 'noteish-notitle',
hasTitle: false
}
],
draganddropfiles: {
upload: {
config: {
method: 'POST',
url: '/resource',
fieldName: 'upload',
send_multipart_form: true,
callback: function(resp) {
var $img;
if (!(resp.match(/^http/) || resp.match(/^\//) || resp.match(/^[a-z]/))) {
alert('You dropped a file and we sent a message to the server to do something with it.\nIt responded with some gibberish so we are showing you some other file to show it worked');
resp = 'src/test/AlohaEditorLogo.png';
}
$img = Aloha.jQuery('.aloha-image-uploading').add('#' + this.id);
$img.attr('src', resp);
$img.removeClass('aloha-image-uploading');
return console.log('Updated Image src as a result of upload');
}
}
}
},
block: {
defaults: {
'.default-block': {},
figure: {
'aloha-block-type': 'EditableImageBlock'
}
}
}
}
};
return this.Aloha;
}).call(this);