Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@evo42
Created March 7, 2012 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evo42/1993723 to your computer and use it in GitHub Desktop.
Save evo42/1993723 to your computer and use it in GitHub Desktop.
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment