Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 📚 CloudCannon Documentation

![GitHub package.json version](https://img.shields.io/github/package-json/v/CloudCannon/documentation) ![GitHub pull requests](https://img.shields.io/github/issues-pr/Cloudcannon/documentation?label=Pull%20Requests)

This repo holds the source code for Cloudcannon's docs at docs.cloudcannon.com.

## Local Development
To install locally, clone the repo, then run these commands:

```bash
cd src
npm install
gem install bundler
bundle install
gulp dev
```
13 changes: 13 additions & 0 deletions src/collections/_editing_docs/editors/visual-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,17 @@ if (window.location.host === "app.cloudcannon.com") {
} else {
alert("Not in CloudCannon.");
}
{% endhighlight %}

You can also conditionally import scripts embedded in your HTML based on whether or not you
have the visual editor open:

{% highlight html %}
<script>
if(!window.location.host === "app.cloudcannon.com")
{
var script = document.createElement("script");
script.src = 'your-script-url';
}
</script>
{% endhighlight %}