WebStorm – Drag & Drop a reference

in Front-End Web Technologies

It took quite a long time and I am not realy sure when the WebStrom guys actualy added this feature but at last you are able to drag & drop a JavaScript file or CSS file into an HTML file and WebStrom automatically adds the appropriate syntax

For example, dropping a JS file into index.html creates the following syntax

<script src="app.js">script>

And dropping a CSS file creates

<link rel="stylesheet" href="site.css">

As a developer coming from the Visual Studio arena I think this feature is one of the most requested feature by VS developers when switching to WebStorm

Still, the feature is far from being completed

1. You cannot control the location of the reference inside the HTML file. Wherever you drop the file, the reference is always added to the header

2. Dropping  a TS file (Typescript) creates a syntax which references the TS file. In most cases we want to reference the JS file instead (same behavior for the SCSS files)

Enjoy, …

Contact us
You might also like
Share: