Comments (4)
window.getSelection is built into the browser. I'm not seeing this error. Which version of Opera are you using, and which CodeMirror page are you opening?
from codemirror-v1.
Oops, sorry.
I was actually trying to do this :
http://heydojo.co.cc/ckeditor-codemirror/index.html
and it is my fault. I am trying to do too much.
I use the latest snapshot of Opera Linux 10.70 from :
http://my.opera.com/desktopteam/blog/
(10.60 isn't as good.)
I think the problem I am having is that maybe I am trying to destroy and recreate a code mirror instance in a dirty way because in the demo linked above, I get two errors, one when the toggle toolbar button is clicked and the same when switching to and from source mode.
Uncaught exception: TypeError: 'b.getSelection' is not a function
Error thrown at line 12, column 946 in (b) in http://heydojo.co.cc/ckeditor-codemirror/ckeditor/plugins/codemirror/js/select.js:
var c=b.getSelection();
called from line 43, column 288 in () in http://heydojo.co.cc/ckeditor-codemirror/ckeditor/plugins/codemirror/js/editor.js:
select.markSelection(b.win);
So do you have any recommendations on how to destroy the CodeMirror instance cleanly straight after using the getCode() function?
I've read through the manual and it doesn't look like there is such a function.
Thanks,
Tony
from codemirror-v1.
Hi Tony,
I have pushed a fix to the CodeMirror git repository that should fix this. The problem was that a timeout was firing (for the continuousScanning option), which tried to work with the frame, after the frame had been removed from the document. This largely worked, except that, apparently, the window.getSelection function vanishes when a frame is no longer in the document.
Best,
Marijn
from codemirror-v1.
Wow!
Much appreciated.
Thanks for the fix to your awesome editor.
I'll update the demo ASAP.
Cheers!
Tony
from codemirror-v1.
Related Issues (20)
- Autocomplete HOT 4
- PHP Parser fails for some comments HOT 1
- C# parser problem with verbatim string HOT 1
- CodeMirror enterMode config param seems to be ignored if height is set. HOT 1
- Implement electric characters HOT 1
- lostundo missing reference in undo.js HOT 1
- Uncaught ReferenceError: lostundo is not defined HOT 1
- rewrite scrollToNode to just insert a node and check its coords if it needs to
- C# parser : bug with operators (fix inside) HOT 1
- this.editor is undefined (codemirror.js row 203) HOT 1
- content does not show HOT 9
- Liquid Mode for Codemirror2 HOT 6
- setValue() clears undo history HOT 1
- HTML5 required attribute breaks hack for form submission HOT 6
- Speed up hideLine method HOT 1
- Pressing tab causes entire line to indent HOT 4
- unable to get separate history for multiple instances of codemirror HOT 4
- loadmode plugin does not work over non string modes HOT 1
- codemirror
- Mirror Demes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codemirror-v1.