-
Notifications
You must be signed in to change notification settings - Fork 73
Doesn't display any linked css #1
Comments
Are you using relative links? Can you try absolute ones? |
i can’t in this case, I was working with a local file. it looks like remote ones from a CDN are working, though. On Apr 18, 2014, at 7:26 PM, Fatih Kadir AKIN notifications@github.com wrote:
|
Ok, I will work on it 👍 |
👍 |
Have the same Problem, worked from a local directory with a css file in it and linked in the html. |
Yup me too. Atom 0.94. Working for remote css but not local css. |
Same issue. Local included css/js doesn't work. (Atom 0.100) |
Same problem here. Does not load images/css. |
Same here, no local css. |
Same issue, Atom 0.115. Is any fix coming for this soon? |
After some tinkering I did get local stylesheets and script files to work. I had to set the sandbox attribute on the IFRAME, and the way source is set. In the package source file atom-html-preview-view.coffee I changed the line iframe.src = "data:text/html;charset=utf-8,#{encodeURI(text)}" to iframe.setAttribute("sandbox", "allow-scripts allow-same-origin")
iframe.src = @getPath() Changing the source package yourself is pretty easy, while we wait for a update :-) This pull electron/electron#208 has more info. |
I can confirm that @kwaak 's resolution appears to be working. I will continue using it to verify. |
I just used @kwaak suggestion and it works perfectly! Thanks! Now preview shows html+css. |
Thanks @kwaak. It works now like a charm. |
@kwaak solved similar problem I had with images not displaying |
Thanks @kwaak it works now, any way to have this implemented in the package as well? |
@kwaak 's solution isn't working for me. Any suggestions? |
This doesn't work for me. CSS isn't showing up in Atom, but works fine in Chrome. My link tag is in the html document header and looks like this: |
Works so great, thanks! |
@kwaak please explain in more details how to fix the issue, Sorry, I'm a beginner so I didn't get what exactly should I do to make Atom Preview read css commends as well. really-Really rely on your help |
atom .089
css files linked do not affect preview. preview document is plain html.
The text was updated successfully, but these errors were encountered: