public
Created

  • Download Gist
stackoverflow-9008888.html
HTML
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
<head>
<script type="text/javascript">
(function (window, undefined) {
 
if (window.Aloha === undefined || window.Aloha === null) {
var Aloha = window.Aloha = {};
}
 
Aloha.settings = {
logLevels: {
'error': true,
'warn': true,
'info': true,
'debug': true
},
errorhandling: false,
ribbon: false,
"i18n": {
// let the system detect the users language
"acceptLanguage": '<?=$_SERVER['
HTTP_ACCEPT_LANGUAGE ']?>'
//"acceptLanguage": 'fr,de-de,de;q=0.8,it;q=0.6,en-us;q=0.7,en;q=0.2'
},
"plugins": {
"format": {
// all elements with no specific configuration get this configuration
config: ['b', 'i', 'sub', 'sup'],
editables: {
// no formatting allowed for title
'#title': [],
// content is a DIV and has class .article so it gets both buttons
'#content': ['b', 'i', 'p', 'title', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', 'removeFormat']
}
},
"dragndropfiles": {
config: {
'drop': {
'max_file_size': '200000',
'upload': { //'uploader_class':GENTICS.Aloha.Uploader, //this is the default
'config': {
'url': '/media/images_dragged/',
'extra_headers': {
'Accept': 'application/json'
},
'additional_params': {
"location": ""
},
'www_encoded': false
}
}
}
}
},
"table": {
config: ['table']
},
"image": {
config: {
'img': {
'max_width': '50px',
'max_height': '50px'
}
},
editables: {
'#title': {},
}
}
}
};
 
})(window);
</script>
<link rel="stylesheet" href="/aloha-editor/css/aloha.css" id="aloha-style-include"
type="text/css">
<script src="/aloha-editor/lib/aloha.js" data-aloha-plugins="common/format,extra/draganddropfiles,common/image,common/link"></script>
</head>
<body>
<div id="content">aloha</div>
<script type="text/javascript">
Aloha.ready(function () {
Aloha.require(['aloha', 'aloha/jquery', 'aloha/floatingmenu'], function (Aloha, $, FloatingMenu) {
$('#content').aloha();
});
});
</script>
</body>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.