# Smart Keys settings: JavaScript

> **TL;DR**
> `File | Settings | Editor | General | Smart Keys | JavaScript` for Windows and Linux
>
>
>
> `CLion | Settings | Editor | General | Smart Keys | JavaScript` for macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.settings.svg)

Use this settings page to configure typing assistance features in JavaScript.

For more information about JavaScript support in CLion, see [JavaScript](javascript-specific-guidelines.html).

## Automatically replace string literal with template string on typing '${'

By default, the checkbox is selected and string literals are converted to template strings automatically when you type `${`. This behavior may break interpolation in your code, for example, in Vue.js templates.

Clear the checkbox to prevent breaking interpolation and preserve string literals.

Replace string literal automatically on:

![Automatic replacement on typing '${' is on](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_js_auto_replace_string_literal_on.animated.gif)

Replace string literal automatically off:

![Automatic replacement on typing '${' is off](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_js_auto_replace_string_literal_off.animated.gif)

## Start template string interpolation on typing '$'

Select this checkbox to insert expressions with normal strings after the `$` sign instead of adding curly braces `{}` automatically. For more information, refer to [Expression interpolation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Expression_interpolation).

Interpolation on typing '$' off:

![Interpolation off](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_js_interpolation_off.animated.gif)

Interpolation on typing '$' on:

![Interpolation on](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_js_interpolation_on.animated.gif)

## Escape text on paste in string literals

By default, CLion automatically inserts backslash escape symbols (`\`) when you paste text into a JavaScript string. Clear the Escape text on paste in string literals checkbox to suppress automatic text escaping.

## Close HTML single tags when pasting code into JSX files

By default,   when you copy a piece of HTML code that contains single tags and paste it into JSX, CLion automatically adds a slash `/` at the end of each single tag.

![Transfer HTML to JSX: close single tags](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_paste_from_html_to_jsx_close_tags.animated.gif)

To copy HTML code to JSX "as is", clear the Close HTML single tags when pasting code into JSX files checkbox or use Paste Simple `Ctrl+Alt+Shift+V` (Windows), `⌘ ⌥ ⇧ V` (macOS), `⌘ ⌥ ⇧ V` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ V` (macOS System Shortcuts), `Ctrl+Alt+Shift+V` (XWin), `Ctrl+Alt+Shift+V` (GNOME), `Ctrl+Alt+Shift+V` (KDE), `Ctrl+Alt+Shift+V` (Emacs), `Ctrl+V` (Sublime Text), `⌘ V` (Sublime Text (macOS)), `⌘ ⌥ ⇧ V` (Xcode), `Ctrl+Alt+Shift+V` (Visual Studio), `⌘ ⌥ ⇧ V` (Visual Studio (macOS)), `Ctrl+Alt+Shift+V` (ReSharper), `⌘ ⌥ ⇧ V` (ReSharper (macOS)), `Ctrl+Alt+Shift+V` (QtCreator), `⌘ ⌥ ⇧ V` (QtCreator (macOS)), `Ctrl+Alt+Shift+V` (NetBeans), `Ctrl+Alt+Shift+V` (Eclipse), `⌘ ⌥ ⇧ V` (Eclipse (macOS)).

## Convert HTML attribute names when pasting into JSX files

By default,   when you copy a piece of HTML code with class attributes or on-event handlers and paste it into JSX, CLion automatically replaces these attributes with React-specific ones (`className`, `onClick`, `onChange`, and so on.)

![Transfer HTML to JSX](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_paste_from_html_to_jsx.animated.gif)

To copy HTML code to JSX "as is", clear the Convert HTML attribute names when pasting into JSX files checkbox or use Paste Simple `Ctrl+Alt+Shift+V` (Windows), `⌘ ⌥ ⇧ V` (macOS), `⌘ ⌥ ⇧ V` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ V` (macOS System Shortcuts), `Ctrl+Alt+Shift+V` (XWin), `Ctrl+Alt+Shift+V` (GNOME), `Ctrl+Alt+Shift+V` (KDE), `Ctrl+Alt+Shift+V` (Emacs), `Ctrl+V` (Sublime Text), `⌘ V` (Sublime Text (macOS)), `⌘ ⌥ ⇧ V` (Xcode), `Ctrl+Alt+Shift+V` (Visual Studio), `⌘ ⌥ ⇧ V` (Visual Studio (macOS)), `Ctrl+Alt+Shift+V` (ReSharper), `⌘ ⌥ ⇧ V` (ReSharper (macOS)), `Ctrl+Alt+Shift+V` (QtCreator), `⌘ ⌥ ⇧ V` (QtCreator (macOS)), `Ctrl+Alt+Shift+V` (NetBeans), `Ctrl+Alt+Shift+V` (Eclipse), `⌘ ⌥ ⇧ V` (Eclipse (macOS)).

## Escape JSDoc leading asterisks on copy and paste

By default, the checkbox is selected and a leading asterisk character (`*`) is automatically inserted when you paste a code fragment into a selection within a JSDoc comment.

In some cases, adding an asterisk in preposition may break formatting or make JSDoc comments hard to read. To suppress adding asterisks automatically on pasting code snippets, clear the Escape JSDoc leading asterisks on copy and paste checkbox.

Escape JSDoc leading asterisks on:

![Escape JSDoc leading asterisks on copy and paste is on](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_jsdoc_asterisk_on.png)

Escape JSDoc leading asterisks off:

![Escape JSDoc leading asterisks on copy and paste is off](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_smart_keys_jsdoc_asterisk_off.png)

