removed hard dependency on ckeditor...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-31 14:02:43 +04:00
parent 2153de8487
commit 22ca44a279

View File

@ -109,6 +109,15 @@ $(document).ready(function(){
//fingers: $.fn.swipe.fingers.THREE
})
// XXX this will need to be repeated to newly created elements...
$('[contenteditable=true]')
.on('focus', function(){
toggleEditorMode('on')
})
.on('blur', function(){
toggleEditorMode('off')
})
// load state and setup everything that depends on it...
loadState()
@ -140,22 +149,6 @@ $(document).ready(function(){
})
// setup ckeditor events...
// XXX need to $('[contenteditable]').attr('contenteditable', 'false') on
// thumbnail view mode and true on page view mode...
CKEDITOR.on('instanceCreated', function(evt){
var editor = evt.editor
editor.on('focus', function(){
toggleEditorMode('on')
})
editor.on('blur', function(){
toggleEditorMode('off')
})
})
</script>
</head>
<body>