Atom html preview is not working


#1

hi, i am newbie to the programming world as well as to the atom. I am using the windows 32 bit OS. i have installed atom software and atom html preview package. But no use, i have written the the basic HTML code, then went to Packages->Preview HTML->Enable Preview. The preview page is blank and i got one depreciation as “Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done”

Could someone help me


#2

Just to clarify, which package are you using for HTML preview?


#3

Hi,

I believe he is using atom-html-preview, as I am getting the same deprecation warning: “Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done”

If not, then my apologies.


#4

Thanks @wshill - if that’s the case, it looks like that package is no longer maintained as mentioned on the project repository page:


#5

Any suggestions on what to use instead?


#6

I personally haven’t played with one yet but the FAQ item mentions browser-plus and live-reload:

atom-browsersync was mentioned recently as well /cc Seeing what I've coded in a browser.

Folks in the community may have other suggestions too.


#8

Not sure if it’s a fix, or if it is just suppressing the error, but here is what I did.
Open C:\User\replacewithuseraccountname.atom\packages\atom-html-preview\lib\atom-html-preview.coffe
Go to line 78.
It should look like this:
atom.workspace.open(uri, split: ‘right’, searchAllPanes: true).done (htmlPreviewView) ->
change it to this:
atom.workspace.open(uri, split: ‘right’, searchAllPanes: true).then (htmlPreviewView) ->
It stopped throwing a warning once I did this.


#9

Dear wshill,
Did the HTML preview work after you went through this process? I’m asking because I’m new to programming, so it will take quite some time for me to figure out what you are explaining. Thanks!


#11

Preview Plus was deprecated too.