Custom CSS for "Anyone with link"


#1

Hi, this is my first post, I am enjoying to work with Gingko.

When I export my tree, everything is fine and look like this:

But, when I give the link to someone else, using the option Who can View > Anyone with link
my custom css doesn’t work and it renders inside of <p> tag.

I am using this code:

<style>
.html-export /* custom tag */ {
/* custom css*/
}
</style>

Thanks!


#2

This bug still exists! I would really like to use custom CSS in the “anyone with a link” view, but if I can’t, then I can’t really use Gingko for my purposes :frowning:


#3

@Adriano

Gingko is an amazing app! Though, because of this problem (CSS/JS doesn’t render in “anyone with link” view) I can’t use it for a work project and thus will not be paying to use the app. Any chance you’ll be able to fix this problem in the near future? Thanks for your input!


#4

Hi @anthonem.

I fixed this issue now. Let me know if you have any problems with it, or if it doesn’t behave as you expect.

:slight_smile:


#5

Hi @Adriano – thanks so much!

The CSS is rendering perfectly in the “anyone with link” view. I have some javascript that is triggered by a checkbox…it is currently working in edit view, but it doesn’t work in the “anyone with link” view. Here is a quick video showing this behavior:

Thanks again for your help.


#6

Alright, I see the issue in the console:
Screenshot_2017-12-22_12-35-01

I don’t load jquery on public trees, since it’d be a large download for nothing in most cases (most public trees don’t have JS or use jquery).

Try including it yourself in your tree, using a script from Jquery CDN. Here’s the one that’s current for right now:

<script
  src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
  integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
  crossorigin="anonymous"></script>

Let me know.


#7

@Adriano – excellent - works like a charm! :smile: