Pinegrow WYSIWYG display doesn't show an included file

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 –


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

Don C.


<!doctype html>
<html lang="en">
    <meta charset="utf-8">

      /* 28/Feb/2022 - from */

    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: */
"GET", file, true);
          /* Exit the function: */

    <p>Some content</p>

    <div w3-include-html="/test_include_file.html"></div> <!-- <p>Hello world!</p> -->
      <!-- 28/Feb/2022 - see -->

  <script> <!-- 28/Feb/2022 - from -->


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 Using partials you can more easily use the WYSIWYG features.