This may have been already answered but is there a way to initiate the inline editor (with multiple instances on the page) on double click instead of when you simply click in an editable region. It would be great to have this option as users frequestly use the functionality of the page (i.e. click on hyperlinks to test or browse about the site) prior to actually needing to edit it.
Any help on this would be greatly appreciated.
Also, I could not figure out how to search the forum. Is this feature not available or am I simply missing the obvious.
Thanks!
Here's something incomplete
Here's something incomplete that I whipped up. There is still some strangeness to resolve with respect to exiting the editor (you have to click out, then in twice to get it to break out?), but the double-click dynamic instantiation is working for me:
then just add this to the page:
I implemented this by modifying the samples/inlinebycode.html that CKE4 ships with and the above is working for me in FireFox, less the incomplete portion that I don't really have time to fiddle with right now.
Regards,
- SK
Hear is a way around this
Before I show you how Ive done it I want to say it probably isnt the most conventional way to solve it but it does work and for my purpose its solved serval other issues so I killed a few birds with the same stone so to speak.
What I did: basically Ive attached a jquery dblclick handle to each text block which when double clicked grabs the content of the block plus its size and position. it created a new div called 'edit' and absolutely positions it exactly over the original div and copys the content to it.
apply the CKeditor to the new div which is over toe top and .focus the div is its already inside ready for editing. When youve done editing simply click another div will copy the content back to its original.
Heres a JSBIN with the full working example: http://jsbin.com/etorir/4
Note: I still agree the CKEDITOR needs to offer a double click event for inline divs. it would be very nice.
Hey not sure if this is
Hey not sure if this is exactly the same problem but I also wanted the editor AND editing of text to just be enabled on some event (e.g. doubleclick). What I found woks is:
I get an error at the end
Uncaught TypeError: Cannot call method 'getRanges' of null
but it seems to work like expected
Where do you add that code?
Where do you add that code? Looks like a bit of code with the "...".
I'm looking for a way of getting the double click to activate selected divs. I have one editing area that sometimes is supposed to cover another area to the right side, and in that case the area to the right should not be "active".
I tried this simple approach:
I tried this simple approach:
It works as expected to allow inline editing only after doubleclick, but the content is not saved with the ClickToSave function as the instance is not defined.
Firebug tells me this: