二〇一八年一月二十六日
Custom style script
Purpose:
- Destroy all ckeditors
- Set F10 bindings for VimArea
- Destroy all ckeditors
- Set F10 bindings for VimArea
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ( function () { if ( window[ "CKEDITOR" ] ) Object.values( CKEDITOR.instances ).forEach( x => x.destroy() ); try { window.VimArea = BotanJS.import( "Components.Vim.VimArea" ); } catch ( ex ) { var sc = document.createElement( "script" ); sc.src = "//astrojs.k8s.astropenguin.net/ojs/Components.Vim.VimArea" ; // Last modified: 2022.04.19 document.head.appendChild( sc ); } var _waitf = function () { try { window.VimArea = BotanJS.import( "Components.Vim.VimArea" ); } catch ( ex ) { return ; } clearInterval( _waitf ); window.VimArea = BotanJS.import( "Components.Vim.VimArea" ); var d = BotanJS.import( "Dandelion" ); var f10Binding = function ( e ) { e = e || window.event; if ( e.keyCode ) code = e.keyCode; else if ( e.which ) code = e.which; if ( code == 121 ) // F10, change this value to any key you like { e.preventDefault(); var node = document.activeElement; if ( node.nodeName == "TEXTAREA" ) { new VimArea( node, true ); } } }; if (document.addEventListener) document.addEventListener( 'keydown' , f10Binding, false ); else if (document.attachEvent) document.attachEvent( 'onkeydown' , f10Binding); else document.onkeydown = f10Binding; }; var k = setInterval( _waitf, 100 ); } )(); |
Style
1 2 3 4 5 | textarea[data-vimarea="1"] { font-size: 1.5em; } /* //s.botanical.astropenguin.net/ocss/Components.Vim.VimArea */ |

Fri Jan 26 2018 03:52:51 GMT+0000 (Coordinated Universal Time)
Last modified: Tue Apr 19 2022 09:25:22 GMT+0000 (Coordinated Universal Time)
Comments
No comments here.
Do you even comment?
website:
Not a valid website
Invalid email format
Please enter your email
*Name:
Please enter a name
Submit
抱歉,Google Recaptcha 服務被牆掉了,所以不能回覆了