From 22ca44a2799c0641437d0af99adb9223cce530f3 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 31 Jan 2013 14:02:43 +0400 Subject: [PATCH] removed hard dependency on ckeditor... Signed-off-by: Alex A. Naanou --- editor.html | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/editor.html b/editor.html index 6c1047a..e5db370 100755 --- a/editor.html +++ b/editor.html @@ -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') - }) -}) - - - -