| Page 1 of 1 | [ 5 posts ] |
|
Hi,
I've a requirement like when I hit Ctrl + Space combination, I need to show a EditorWindow which will populates few suggestions from web service call. Once the user clicks a suggestion, I need to place that string in place in the editor. I've tried by looking into EditorWindow.js & Editor.js, SimpleEditor.js source files and by following few other similar issues posted in this forum (viewtopic.php?p=3427) and Dav's post (http://new.davglass.com/files/yui/editor41/). My code: https://gist.github.com/930837 When I type some key, those two methods are get invoked (verified by keeping console.log). But the EditorWindow is not shown. The difference between the code in http://gist.github.com/194304 (posted in viewtopic.php?p=3427#p3427) and mine is there image insertion is done and it'll be replaced with span. Is that mandatory to use Code: executeCommand('insertimage', 'none'); I couldn't find a good guide on using EditorWindow's. If some knew one, please recommend the link. Any help is appreciated. ManiKanta |
|
I think I m answering my own question.
The culprit is Code: YAHOO.util.Event.preventDefault(event) I need return false from the method in order to stop the even bubbling. Corrected the code in the Gist version 3. Working YUI RTE EditorWindowClick here to see the revision history on this Gist.Hope this helps some one who struck up with the same issue :p ManiKanta |
|
Thats leave the issue - Do we really need to use
Code: executeCommand('insertimage', 'none'); always if we want to open EditorWindow? |
|
You don't need to call execCommand to open the window, the openWindow command should work just fine.
See this example: http://new.davglass.com/files/yui/editor42/ |
|
Thanks Dave. Example looks promising. I'll look into it.
Thanks. ManiKanta |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group