Custom style script
Purpose:
 - Destroy all ckeditors
 - Set F10 bindings for VimArea
(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

textarea[data-vimarea="1"] {
	font-size: 1.5em;
}

/* //s.botanical.astropenguin.net/ocss/Components.Vim.VimArea */
Profile picture
斟酌 鵬兄
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 服務被牆掉了,所以不能回覆了