# User Defined Content

**URL:** https://forum.bootstrapstudio.io/t/user-defined-content/9869
**Category:** Bootstrap Studio Help
**Created:** [January 22, 2023, 11:15pm UTC](https://forum.bootstrapstudio.io/t/user-defined-content/9869 "2023-01-22T23:15:57Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![richards](https://forum.bootstrapstudio.io/user_avatar/forum.bootstrapstudio.io/richards/32/3163_2.png) [@richards](https://forum.bootstrapstudio.io/u/richards)
#### Post date: [January 23, 2023, 1:26pm UTC](https://forum.bootstrapstudio.io/t/user-defined-content/9869/4 "2023-01-23T13:26:15Z")

</div>

Instead of using a google sheet, use a google doc for each page.

Create a page on google docs add your text, then File\>Share\>Publish to Web

Copy the link in the publish to web dialog box

then in bss add the following js:

```auto
 

fetch('<URL to google doc>').then(function (response) {
 	return response.text();
}).then(function (html) {

 	var parser = new DOMParser();
	var doc = parser.parseFromString(html, 'text/html');
 	var content = doc.querySelector('.doc-content').innerHTML;
	 
document.getElementById("showcontent").innerHTML = content;

}).catch(function (err) {
	console.warn('Something went wrong.', err);
});

```

Create a div with the ID of showcontent where you want the content to show.

Updated code is now here:

> [@A very simple CMS using google docs and BSS](https://forum.bootstrapstudio.io/t/a-very-simple-cms-using-google-docs-and-bss/9875):
>
> Following on from an earlier post ([User Defined Content](https://forum.bootstrapstudio.io/t/user-defined-content/9869)), I expanded my code to create a very simple CMS using google docs to allow the client to edit the page. Setup: Google Docs: Create a doc for each page you want to manage, add your text, then File\>Share\>Publish to Web Copy the link in the publish to web dialog box to be added to the relevant gdoc in the javascript Bootstrap Studio In your bss page create an empty heading element with an ID of showtitle, and an empty div with an ID of s…

---

_[View the full topic](https://forum.bootstrapstudio.io/t/user-defined-content/9869)._
