$95 GRAYBYTE WORDPRESS FILE MANAGER $40

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/code-snippets-pro/js/edit/

HOME
Current File : /home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/code-snippets-pro/js/edit//editor.ts
import 'codemirror-colorpicker'
import '../editor'

export const loadSnippetCodeEditor = () => {
	const { codeEditor } = window.wp
	const textarea = document.getElementById('snippet_code')

	if (!textarea) {
		console.error('Could not initialise CodeMirror on textarea.', textarea)
		return
	}

	const editor = codeEditor.initialize(textarea)
	window.code_snippets_editor = editor

	const extraKeys = editor.codemirror.getOption('extraKeys')
	const controlKey = window.navigator.platform.match('Mac') ? 'Cmd' : 'Ctrl'
	const saveSnippet = () => document.getElementById('save_snippet')?.click()

	editor.codemirror.setOption('extraKeys', {
		...'object' === typeof extraKeys ? extraKeys : {},
		[`${controlKey}-S`]: saveSnippet,
		[`${controlKey}-Enter`]: saveSnippet,
	})

	if (window.navigator.platform.match('Mac')) {
		const helpText = document.querySelector('.editor-help-text')
		if (helpText) {
			helpText.className += ' platform-mac'
		}
	}

	const directionControl = document.getElementById('snippet-code-direction') as HTMLSelectElement | null
	directionControl?.addEventListener('change', () => {
		window.code_snippets_editor?.codemirror.setOption('direction', 'rtl' === directionControl.value ? 'rtl' : 'ltr')
	})
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0755
clipboard.ts
0.704 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
editor.ts
1.2 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
shortcode.ts
1.064 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
tabs.ts
1.717 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
tags.ts
0.396 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
validate.ts
0.777 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF