You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would also be interesting to try out the SQL hint mode, which can autocomplete against tables and columns. This demo shows how to configure that: https://codemirror.net/mode/sql/
Activity
simonw commentedon Aug 24, 2020
CodeMirror 6 is in pre-release at the moment and is a complete rewrite. I'll stick with the 5.x series for now. https://github.com/codemirror/codemirror.next/
simonw commentedon Aug 24, 2020
It would also be interesting to try out the SQL hint mode, which can autocomplete against tables and columns. This demo shows how to configure that: https://codemirror.net/mode/sql/
simonw commentedon Aug 30, 2020
Minifying using
npx:simonw commentedon Aug 30, 2020
One catch: this stripped the license information from the top of the JS.
I fixed this by editing the license to be a single
/* ... */block comment instead of multiple//lines and running this:simonw commentedon Aug 30, 2020
So the steps needed are:
lib/codemirror.jstocodemirror-5.57.0.jslib/codemirror.csstocodemirror-5.57.0.cssmode/sql/sql.jstocodemirror-5.57.0-sql.js/* */blocknpx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js --comments '/LICENSE/'npx uglify-js codemirror-5.57.0-sql.js -o codemirror-5.57.0-sql.min.js --comments '/LICENSE/'npx clean-css-cli codemirror-5.57.0.css -o codemirror-5.57.0.min.css_codemirror.htmltemplate to reference the new filesgit rmthe old files,git addthe new filesUpgrade CodeMirror to 5.57.0, refs #948
simonw commentedon Aug 30, 2020
I'll wait for this to deploy to https://latest.datasette.io/ and then test it in various desktop and mobile browsers.
simonw commentedon Aug 30, 2020
Copy and paste on mobile safari seems to work now. #655
Notes on upgrading CodeMirror, refs #948
simonw commentedon Aug 30, 2020
I added documentation on how to upgrade CodeMirror for the future here: https://docs.datasette.io/en/latest/contributing.html#upgrading-codemirror
Release notes for 0.49a1
Release 0.49