https://techglimpse.com For all your Tech Needs! Tue, 12 Jul 2022 09:32:34 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.6 Dynamically increase font size of CodeMirror editor texts https://techglimpse.com/dynamically-increase-font-size-of-codemirror-editor-texts/ https://techglimpse.com/dynamically-increase-font-size-of-codemirror-editor-texts/#respond Wed, 06 Jul 2022 06:50:45 +0000 https://techglimpse.com/?post_type=ht_kb&p=43318 Question: I have been using the CodeMirror editor for one of my projects to allow users to write Python code. Is it possible to dynamically increase font size of CodeMirror editor texts? – Ravi Kumar. Dynamically Increase font size of Codemirror editor texts You need to write a simple JavaScript...

The post Dynamically increase font size of CodeMirror editor texts appeared first on Techglimpse.

]]>
0
preventDefault() not working on keyup event [jQuery] https://techglimpse.com/preventdefault-not-working-keyup-event-javascript/ https://techglimpse.com/preventdefault-not-working-keyup-event-javascript/#comments Sun, 01 May 2022 10:15:30 +0000 https://techglimpse.com/?post_type=ht_kb&p=43297 I have developed an application that uses CodeMirror editor which by default creates a new line upon hitting the Enter key. I also detect the Shift+Enter on keyup event to carry out a different operation as shown below: $("#editor + .CodeMirror").bind('keyup',function(event) { //Check if Enter key is pressed if (event.keyCode...

The post preventDefault() not working on keyup event [jQuery] appeared first on Techglimpse.

]]>
1
Detect Shift-Enter keypress in JavaScript https://techglimpse.com/detect-shift-enter-keypress-javascript/ https://techglimpse.com/detect-shift-enter-keypress-javascript/#respond Tue, 18 Jan 2022 12:09:50 +0000 https://techglimpse.com/?post_type=ht_kb&p=42796 Here’s a question from one of our readers, Ms. Shikha. I read your article on KeyBoardEvent.keyCode is deprecated and the alternate property .key should be used. While using the .key property, how can I detect the Shift-Enter keypress in JavaScript? How to Detect Shift-Enter Keypress in JavaScript? In my previous...

The post Detect Shift-Enter keypress in JavaScript appeared first on Techglimpse.

]]>
0
KeyboardEvent.keyCode deprecated! Alternate is .key https://techglimpse.com/keyboardevent-keycode-deprecated-alternate-key-property/ https://techglimpse.com/keyboardevent-keycode-deprecated-alternate-key-property/#comments Tue, 18 Jan 2022 10:33:49 +0000 https://techglimpse.com/?post_type=ht_kb&p=42792 I have been using KeyboardEvent.keyCode property to detect the keys pressed in JavaScript. For example, in one of my applications, I had been using the keyCode property to detect the Enter keypress and execute a corresponding code. Though the code was working fine on all browsers, I recently came to...

The post KeyboardEvent.keyCode deprecated! Alternate is .key appeared first on Techglimpse.

]]>
1