# Pinegrow WYSIWYG display doesn't show an included file

**URL:** <https://forum.pinegrow.com/t/pinegrow-wysiwyg-display-doesnt-show-an-included-file/6337>\
**Category:** Beginners\
**Created:** [February 28, 2022, 3:37pm UTC](https://forum.pinegrow.com/t/pinegrow-wysiwyg-display-doesnt-show-an-included-file/6337 "2022-02-28T15:37:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dculp](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dculp](https://forum.pinegrow.com/u/dculp)\
**Post date:** [February 28, 2022, 3:37pm UTC](https://forum.pinegrow.com/t/pinegrow-wysiwyg-display-doesnt-show-an-included-file/6337/1 "2022-02-28T15:37:03Z")

</div>

I have set up a minimal test file to see how a file can be included in the main file. The included file (test\_include\_file.html) only contains `<p>Hello world!</p>` with a carriage return at the end (see code below).

Pinegrow’s WYSIWYG display doesn’t show “Hello world!”; it only shows the paragraph “Some content”. However, if I “\Page\Preview in browser” then both lines are shown –

![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/e/e79983a2e8f1c95e4ea715f71c01055292d7b414.png)

Is there a way to show the included file’s content in Pinegrow’s WYSIWYG display? (I’d like to do this because I have a main file with a 1000-line list where that list could be handled more easily outside of the main file – i.e., in a separate included file.)

Pinegrow 6.4, Windows 10

Thanks,  
Don C.

==========================================================================

```auto
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>blah</title>

    <script>
      /* 28/Feb/2022 - from https://www.w3schools.com/howto/howto_html_include.asp */

    function includeHTML() {
      var z, i, elmnt, file, xhttp;
      /* Loop through a collection of all HTML elements: */
      z = document.getElementsByTagName("*");
      for (i = 0; i < z.length; i++) {
        elmnt = z[i];
        /*search for elements with a certain atrribute:*/
        file = elmnt.getAttribute("w3-include-html");
        if (file) {
          /* Make an HTTP request using the attribute value as the file name: */
          xhttp = new XMLHttpRequest();
          xhttp.onreadystatechange = function() {
            if (this.readyState == 4) {
              if (this.status == 200) {elmnt.innerHTML = this.responseText;}
              if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
              /* Remove the attribute, and call this function once more: */
              elmnt.removeAttribute("w3-include-html");
              includeHTML();
            }
          }
          xhttp.open("GET", file, true);
          xhttp.send();
          /* Exit the function: */
          return;
        }
      }
    }
    </script>

  </head>
  <body>
    <p>Some content</p>

    <div w3-include-html="/test_include_file.html"></div> <!-- <p>Hello world!</p> -->
      <!-- 28/Feb/2022 - see https://www.w3schools.com/howto/howto_html_include.asp -->

  <script> <!-- 28/Feb/2022 - from https://www.w3schools.com/howto/howto_html_include.asp -->
  includeHTML();
  </script>

  </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [February 28, 2022, 6:57pm UTC](https://forum.pinegrow.com/t/pinegrow-wysiwyg-display-doesnt-show-an-included-file/6337/2 "2022-02-28T18:57:48Z")

</div>

Hi @dculp,  
The short answer is no because the WYSIWYG isn’t really running off a server.

The longer answer is to use Pinegrow partials. This allows you to manage parts of your code as separate files. [Partials | Pinegrow Web Editor](https://pinegrow.com/docs/pinegrow-pro/partials/) Using partials you can more easily use the WYSIWYG features.  
Cheers,  
Bob
