Upload 2 files
Browse files- editor.html +58 -445
- new-page-blank-template.html +28 -0
editor.html
CHANGED
|
@@ -23,6 +23,19 @@
|
|
| 23 |
return originalSaveAjax.call(this, data, saveUrl, callback, error);
|
| 24 |
};
|
| 25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
});
|
| 27 |
</script>
|
| 28 |
</head>
|
|
@@ -418,7 +431,7 @@
|
|
| 418 |
<option value="active">active</option>
|
| 419 |
<option value="nth-of-type(2n)">nth-of-type(2n)</option>
|
| 420 |
</select>
|
| 421 |
-
|
| 422 |
</div>
|
| 423 |
</div>
|
| 424 |
|
|
@@ -1823,458 +1836,58 @@ Unzip the latest ckeditor release zip from https://github.com/ckeditor/ckeditor4
|
|
| 1823 |
<script src="libs/autocomplete/jquery.autocomplete.js"></script>
|
| 1824 |
-->
|
| 1825 |
<script>
|
| 1826 |
-
|
| 1827 |
-
let deleteUrl = 'save.php?action=delete';
|
| 1828 |
-
let saveReusableUrl = 'save.php?action=saveReusable';
|
| 1829 |
-
let oEmbedProxyUrl = 'save.php?action=oembedProxy';
|
| 1830 |
-
let chatgptOptions = {"key":"","model":"gpt-3.5-turbo-instruct","temperature":0,"max_tokens":300};
|
| 1831 |
-
|
| 1832 |
let defaultPages = {
|
| 1833 |
-
//uncomment php code below and rename file to .php extension to load saved html files in the editor or use editor.php
|
| 1834 |
-
/*
|
| 1835 |
-
<?php
|
| 1836 |
-
$htmlFiles = glob('{my-pages/*.html,demo/*\/*.html, demo/*.html}', GLOB_BRACE);
|
| 1837 |
-
foreach ($htmlFiles as $file) {
|
| 1838 |
-
if (in_array($file, array('new-page-blank-template.html', 'editor.html'))) continue;//skip template files
|
| 1839 |
-
$pathInfo = pathinfo($file);
|
| 1840 |
-
$filename = $pathInfo['filename'];
|
| 1841 |
-
$folder = preg_replace('@/.+?$@', '', $pathInfo['dirname']);
|
| 1842 |
-
$subfolder = preg_replace('@^.+?/@', '', $pathInfo['dirname']);
|
| 1843 |
-
if ($filename == 'index' && $subfolder) {
|
| 1844 |
-
$filename = $subfolder;
|
| 1845 |
-
}
|
| 1846 |
-
$url = $pathInfo['dirname'] . '/' . $pathInfo['basename'];
|
| 1847 |
-
?>
|
| 1848 |
-
"<?php echo ucfirst($filename);?>":{name:"<?php echo ucfirst($filename);?>", file:"<?php echo ucfirst($filename);?>", title:"<?php echo ucfirst($filename);?>", url: "<?php echo $url;?>", folder:"<?php echo $folder?>"},
|
| 1849 |
-
<?php } ?>
|
| 1850 |
-
*/
|
| 1851 |
-
"index": {
|
| 1852 |
-
name: "index",
|
| 1853 |
-
filename: "index.html",
|
| 1854 |
-
file: "demo/landing/index.html",
|
| 1855 |
-
url: "demo/landing/index.html",
|
| 1856 |
-
title: "Home page",
|
| 1857 |
-
folder: null,
|
| 1858 |
-
description: "Website homepage"
|
| 1859 |
-
},
|
| 1860 |
-
"contact": {
|
| 1861 |
-
name: "contact",
|
| 1862 |
-
filename: "contact.html",
|
| 1863 |
-
file: "demo/landing/contact.html",
|
| 1864 |
-
url: "demo/landing/contact.html",
|
| 1865 |
-
title: "Contact us page",
|
| 1866 |
-
folder: null,
|
| 1867 |
-
description: "Contact us page"
|
| 1868 |
-
},
|
| 1869 |
"blank": {
|
| 1870 |
name: "blank",
|
| 1871 |
-
filename: "blank.html",
|
| 1872 |
-
file: "
|
| 1873 |
-
url: "
|
| 1874 |
title: "Blank page",
|
| 1875 |
folder: null,
|
| 1876 |
-
description: "
|
| 1877 |
-
}
|
| 1878 |
-
|
| 1879 |
-
name: "error404",
|
| 1880 |
-
filename: "error404.html",
|
| 1881 |
-
file: "demo/landing/error404.html",
|
| 1882 |
-
url: "demo/landing/error404.html",
|
| 1883 |
-
title: "Page not found",
|
| 1884 |
-
folder: null,
|
| 1885 |
-
description: "Shows when a page is not available"
|
| 1886 |
-
},
|
| 1887 |
-
"error500": {
|
| 1888 |
-
name: "error500",
|
| 1889 |
-
filename: "error500.html",
|
| 1890 |
-
file: "demo/landing/error500.html",
|
| 1891 |
-
url: "demo/landing/error500.html",
|
| 1892 |
-
title: "Server error",
|
| 1893 |
-
folder: null,
|
| 1894 |
-
description: "Site error display page"
|
| 1895 |
-
},
|
| 1896 |
-
"index-blog": {
|
| 1897 |
-
name: "index-blog",
|
| 1898 |
-
filename: "index-blog.html",
|
| 1899 |
-
file: "demo/landing/index-blog.html",
|
| 1900 |
-
url: "demo/landing/index-blog.html",
|
| 1901 |
-
title: "Index blog",
|
| 1902 |
-
folder: null,
|
| 1903 |
-
description: ""
|
| 1904 |
-
},
|
| 1905 |
-
"index-landing": {
|
| 1906 |
-
name: "index-landing",
|
| 1907 |
-
filename: "index-landing.html",
|
| 1908 |
-
file: "demo/landing/index-landing.html",
|
| 1909 |
-
url: "demo/landing/index-landing.html",
|
| 1910 |
-
title: "Index landing",
|
| 1911 |
-
folder: null,
|
| 1912 |
-
description: ""
|
| 1913 |
-
},
|
| 1914 |
-
"index.coming-soon": {
|
| 1915 |
-
name: "index.coming-soon",
|
| 1916 |
-
filename: "index.coming-soon.html",
|
| 1917 |
-
file: "demo/landing/index.coming-soon.html",
|
| 1918 |
-
url: "demo/landing/index.coming-soon.html",
|
| 1919 |
-
title: "Coming soon",
|
| 1920 |
-
folder: null,
|
| 1921 |
-
description: "Coming soon message page"
|
| 1922 |
-
},
|
| 1923 |
-
"index.maintenance": {
|
| 1924 |
-
name: "index.maintenance",
|
| 1925 |
-
filename: "index.maintenance.html",
|
| 1926 |
-
file: "demo/landing/index.maintenance.html",
|
| 1927 |
-
url: "demo/landing/index.maintenance.html",
|
| 1928 |
-
title: "Under maintenance",
|
| 1929 |
-
folder: null,
|
| 1930 |
-
description: "Website under maintenance message page"
|
| 1931 |
-
},
|
| 1932 |
-
"email-new": {
|
| 1933 |
-
name: "email-new",
|
| 1934 |
-
filename: "new.html",
|
| 1935 |
-
file: "demo/landing/email/order/new.html",
|
| 1936 |
-
url: "demo/landing/email/order/new.html",
|
| 1937 |
-
title: "New",
|
| 1938 |
-
folder: "email",
|
| 1939 |
-
description: ""
|
| 1940 |
-
},
|
| 1941 |
-
"email-new.txt": {
|
| 1942 |
-
name: "email-new.txt",
|
| 1943 |
-
filename: "new.txt.html",
|
| 1944 |
-
file: "demo/landing/email/order/new.txt.html",
|
| 1945 |
-
url: "demo/landing/email/order/new.txt.html",
|
| 1946 |
-
title: "New txt",
|
| 1947 |
-
folder: "email",
|
| 1948 |
-
description: ""
|
| 1949 |
-
},
|
| 1950 |
-
"email-reset": {
|
| 1951 |
-
name: "email-reset",
|
| 1952 |
-
filename: "reset.html",
|
| 1953 |
-
file: "demo/landing/email/user/reset.html",
|
| 1954 |
-
url: "demo/landing/email/user/reset.html",
|
| 1955 |
-
title: "Reset",
|
| 1956 |
-
folder: "email",
|
| 1957 |
-
description: ""
|
| 1958 |
-
},
|
| 1959 |
-
"email-reset.txt": {
|
| 1960 |
-
name: "email-reset.txt",
|
| 1961 |
-
filename: "reset.txt.html",
|
| 1962 |
-
file: "demo/landing/email/user/reset.txt.html",
|
| 1963 |
-
url: "demo/landing/email/user/reset.txt.html",
|
| 1964 |
-
title: "Reset txt",
|
| 1965 |
-
folder: "email",
|
| 1966 |
-
description: ""
|
| 1967 |
-
},
|
| 1968 |
-
"email-signup": {
|
| 1969 |
-
name: "email-signup",
|
| 1970 |
-
filename: "signup.html",
|
| 1971 |
-
file: "demo/landing/email/user/signup.html",
|
| 1972 |
-
url: "demo/landing/email/user/signup.html",
|
| 1973 |
-
title: "Signup",
|
| 1974 |
-
folder: "email",
|
| 1975 |
-
description: ""
|
| 1976 |
-
},
|
| 1977 |
-
"email-signup.txt": {
|
| 1978 |
-
name: "email-signup.txt",
|
| 1979 |
-
filename: "signup.txt.html",
|
| 1980 |
-
file: "demo/landing/email/user/signup.txt.html",
|
| 1981 |
-
url: "demo/landing/email/user/signup.txt.html",
|
| 1982 |
-
title: "Signup txt",
|
| 1983 |
-
folder: "email",
|
| 1984 |
-
description: ""
|
| 1985 |
-
},
|
| 1986 |
-
"user-edit": {
|
| 1987 |
-
name: "user-edit",
|
| 1988 |
-
filename: "edit.html",
|
| 1989 |
-
file: "demo/landing/user/edit.html",
|
| 1990 |
-
url: "demo/landing/user/edit.html",
|
| 1991 |
-
title: "Edit",
|
| 1992 |
-
folder: "user",
|
| 1993 |
-
description: ""
|
| 1994 |
-
},
|
| 1995 |
-
"user-reset": {
|
| 1996 |
-
name: "user-reset",
|
| 1997 |
-
filename: "reset.html",
|
| 1998 |
-
file: "demo/landing/user/reset.html",
|
| 1999 |
-
url: "demo/landing/user/reset.html",
|
| 2000 |
-
title: "Reset",
|
| 2001 |
-
folder: "user",
|
| 2002 |
-
description: ""
|
| 2003 |
-
},
|
| 2004 |
-
"cart-cart": {
|
| 2005 |
-
name: "cart-cart",
|
| 2006 |
-
filename: "cart.html",
|
| 2007 |
-
file: "demo/landing/cart/cart.html",
|
| 2008 |
-
url: "demo/landing/cart/cart.html",
|
| 2009 |
-
title: "Cart",
|
| 2010 |
-
folder: "cart",
|
| 2011 |
-
description: ""
|
| 2012 |
-
},
|
| 2013 |
-
"checkout-checkout": {
|
| 2014 |
-
name: "checkout-checkout",
|
| 2015 |
-
filename: "checkout.html",
|
| 2016 |
-
file: "demo/landing/checkout/checkout.html",
|
| 2017 |
-
url: "demo/landing/checkout/checkout.html",
|
| 2018 |
-
title: "Checkout",
|
| 2019 |
-
folder: "checkout",
|
| 2020 |
-
description: ""
|
| 2021 |
-
},
|
| 2022 |
-
"checkout-confirm": {
|
| 2023 |
-
name: "checkout-confirm",
|
| 2024 |
-
filename: "confirm.html",
|
| 2025 |
-
file: "demo/landing/checkout/confirm.html",
|
| 2026 |
-
url: "demo/landing/checkout/confirm.html",
|
| 2027 |
-
title: "Confirm",
|
| 2028 |
-
folder: "checkout",
|
| 2029 |
-
description: ""
|
| 2030 |
-
},
|
| 2031 |
-
"checkout-order": {
|
| 2032 |
-
name: "checkout-order",
|
| 2033 |
-
filename: "order.html",
|
| 2034 |
-
file: "demo/landing/checkout/order.html",
|
| 2035 |
-
url: "demo/landing/checkout/order.html",
|
| 2036 |
-
title: "Order",
|
| 2037 |
-
folder: "checkout",
|
| 2038 |
-
description: ""
|
| 2039 |
-
},
|
| 2040 |
-
"content-archive": {
|
| 2041 |
-
name: "content-archive",
|
| 2042 |
-
filename: "archive.html",
|
| 2043 |
-
file: "demo/landing/content/archive.html",
|
| 2044 |
-
url: "demo/landing/content/archive.html",
|
| 2045 |
-
title: "Archive",
|
| 2046 |
-
folder: "content",
|
| 2047 |
-
description: ""
|
| 2048 |
-
},
|
| 2049 |
-
"content-category": {
|
| 2050 |
-
name: "content-category",
|
| 2051 |
-
filename: "category.html",
|
| 2052 |
-
file: "demo/landing/content/category.html",
|
| 2053 |
-
url: "demo/landing/content/category.html",
|
| 2054 |
-
title: "Category",
|
| 2055 |
-
folder: "content",
|
| 2056 |
-
description: ""
|
| 2057 |
-
},
|
| 2058 |
-
"content-index": {
|
| 2059 |
-
name: "content-index",
|
| 2060 |
-
filename: "index.html",
|
| 2061 |
-
file: "demo/landing/content/index.html",
|
| 2062 |
-
url: "demo/landing/content/index.html",
|
| 2063 |
-
title: "Blog homepage",
|
| 2064 |
-
folder: "content",
|
| 2065 |
-
description: "Blog page with latest posts"
|
| 2066 |
-
},
|
| 2067 |
-
"content-page": {
|
| 2068 |
-
name: "content-page",
|
| 2069 |
-
filename: "page.html",
|
| 2070 |
-
file: "demo/landing/content/page.html",
|
| 2071 |
-
url: "demo/landing/content/page.html",
|
| 2072 |
-
title: "Page",
|
| 2073 |
-
folder: "content",
|
| 2074 |
-
description: ""
|
| 2075 |
-
},
|
| 2076 |
-
"content-post-image-header": {
|
| 2077 |
-
name: "content-post-image-header",
|
| 2078 |
-
filename: "post-image-header.html",
|
| 2079 |
-
file: "demo/landing/content/post-image-header.html",
|
| 2080 |
-
url: "demo/landing/content/post-image-header.html",
|
| 2081 |
-
title: "Post image header",
|
| 2082 |
-
folder: "content",
|
| 2083 |
-
description: ""
|
| 2084 |
-
},
|
| 2085 |
-
"content-post-image-hero": {
|
| 2086 |
-
name: "content-post-image-hero",
|
| 2087 |
-
filename: "post-image-hero.html",
|
| 2088 |
-
file: "demo/landing/content/post-image-hero.html",
|
| 2089 |
-
url: "demo/landing/content/post-image-hero.html",
|
| 2090 |
-
title: "Post image hero",
|
| 2091 |
-
folder: "content",
|
| 2092 |
-
description: ""
|
| 2093 |
-
},
|
| 2094 |
-
"content-post": {
|
| 2095 |
-
name: "content-post",
|
| 2096 |
-
filename: "post.html",
|
| 2097 |
-
file: "demo/landing/content/post.html",
|
| 2098 |
-
url: "demo/landing/content/post.html",
|
| 2099 |
-
title: "Blog post",
|
| 2100 |
-
folder: "content",
|
| 2101 |
-
description: "Blog post",
|
| 2102 |
-
"editor": {
|
| 2103 |
-
"template": "post"
|
| 2104 |
-
}
|
| 2105 |
-
},
|
| 2106 |
-
"content-tag": {
|
| 2107 |
-
name: "content-tag",
|
| 2108 |
-
filename: "tag.html",
|
| 2109 |
-
file: "demo/landing/content/tag.html",
|
| 2110 |
-
url: "demo/landing/content/tag.html",
|
| 2111 |
-
title: "Tag",
|
| 2112 |
-
folder: "content",
|
| 2113 |
-
description: ""
|
| 2114 |
-
},
|
| 2115 |
-
"content-user": {
|
| 2116 |
-
name: "content-user",
|
| 2117 |
-
filename: "user.html",
|
| 2118 |
-
file: "demo/landing/content/user.html",
|
| 2119 |
-
url: "demo/landing/content/user.html",
|
| 2120 |
-
title: "User",
|
| 2121 |
-
folder: "content",
|
| 2122 |
-
description: ""
|
| 2123 |
-
},
|
| 2124 |
-
"product-category": {
|
| 2125 |
-
name: "product-category",
|
| 2126 |
-
filename: "category.html",
|
| 2127 |
-
file: "demo/landing/product/category.html",
|
| 2128 |
-
url: "demo/landing/product/category.html",
|
| 2129 |
-
title: "Category",
|
| 2130 |
-
folder: "product",
|
| 2131 |
-
description: ""
|
| 2132 |
-
},
|
| 2133 |
-
"product-index": {
|
| 2134 |
-
name: "product-index",
|
| 2135 |
-
filename: "index.html",
|
| 2136 |
-
file: "demo/landing/product/index.html",
|
| 2137 |
-
url: "demo/landing/product/index.html",
|
| 2138 |
-
title: "Shop page",
|
| 2139 |
-
folder: "product",
|
| 2140 |
-
description: "Shop homepage"
|
| 2141 |
-
},
|
| 2142 |
-
"product-manufacturer": {
|
| 2143 |
-
name: "product-manufacturer",
|
| 2144 |
-
filename: "manufacturer.html",
|
| 2145 |
-
file: "demo/landing/product/manufacturer.html",
|
| 2146 |
-
url: "demo/landing/product/manufacturer.html",
|
| 2147 |
-
title: "Manufacturer",
|
| 2148 |
-
folder: "product",
|
| 2149 |
-
description: ""
|
| 2150 |
-
},
|
| 2151 |
-
"product-product": {
|
| 2152 |
-
name: "product-product",
|
| 2153 |
-
filename: "product.html",
|
| 2154 |
-
file: "demo/landing/product/product.html",
|
| 2155 |
-
url: "demo/landing/product/product.html",
|
| 2156 |
-
title: "Product",
|
| 2157 |
-
folder: "product",
|
| 2158 |
-
description: ""
|
| 2159 |
-
},
|
| 2160 |
-
"product-vendor": {
|
| 2161 |
-
name: "product-vendor",
|
| 2162 |
-
filename: "vendor.html",
|
| 2163 |
-
file: "demo/landing/product/vendor.html",
|
| 2164 |
-
url: "demo/landing/product/vendor.html",
|
| 2165 |
-
title: "Vendor",
|
| 2166 |
-
folder: "product",
|
| 2167 |
-
description: ""
|
| 2168 |
-
},
|
| 2169 |
-
"search-index": {
|
| 2170 |
-
name: "search-index",
|
| 2171 |
-
filename: "index.html",
|
| 2172 |
-
file: "demo/landing/search/index.html",
|
| 2173 |
-
url: "demo/landing/search/index.html",
|
| 2174 |
-
title: "Search page",
|
| 2175 |
-
folder: "search",
|
| 2176 |
-
description: "Search page"
|
| 2177 |
-
},
|
| 2178 |
-
"user-address": {
|
| 2179 |
-
name: "user-address",
|
| 2180 |
-
filename: "address.html",
|
| 2181 |
-
file: "demo/landing/user/address.html",
|
| 2182 |
-
url: "demo/landing/user/address.html",
|
| 2183 |
-
title: "Address",
|
| 2184 |
-
folder: "user",
|
| 2185 |
-
description: ""
|
| 2186 |
-
},
|
| 2187 |
-
"user-comments": {
|
| 2188 |
-
name: "user-comments",
|
| 2189 |
-
filename: "comments.html",
|
| 2190 |
-
file: "demo/landing/user/comments.html",
|
| 2191 |
-
url: "demo/landing/user/comments.html",
|
| 2192 |
-
title: "Comments",
|
| 2193 |
-
folder: "user",
|
| 2194 |
-
description: ""
|
| 2195 |
-
},
|
| 2196 |
-
"user-downloads": {
|
| 2197 |
-
name: "user-downloads",
|
| 2198 |
-
filename: "downloads.html",
|
| 2199 |
-
file: "demo/landing/user/downloads.html",
|
| 2200 |
-
url: "demo/landing/user/downloads.html",
|
| 2201 |
-
title: "Downloads",
|
| 2202 |
-
folder: "user",
|
| 2203 |
-
description: ""
|
| 2204 |
-
},
|
| 2205 |
-
"user-index": {
|
| 2206 |
-
name: "user-index",
|
| 2207 |
-
filename: "index.html",
|
| 2208 |
-
file: "demo/landing/user/index.html",
|
| 2209 |
-
url: "demo/landing/user/index.html",
|
| 2210 |
-
title: "Dashboard",
|
| 2211 |
-
folder: "user",
|
| 2212 |
-
description: "User dashboard"
|
| 2213 |
-
},
|
| 2214 |
-
"user-login": {
|
| 2215 |
-
name: "user-login",
|
| 2216 |
-
filename: "login.html",
|
| 2217 |
-
file: "demo/landing/user/login.html",
|
| 2218 |
-
url: "demo/landing/user/login.html",
|
| 2219 |
-
title: "Login",
|
| 2220 |
-
folder: "user",
|
| 2221 |
-
description: ""
|
| 2222 |
-
},
|
| 2223 |
-
"user-orders": {
|
| 2224 |
-
name: "user-orders",
|
| 2225 |
-
filename: "orders.html",
|
| 2226 |
-
file: "demo/landing/user/orders.html",
|
| 2227 |
-
url: "demo/landing/user/orders.html",
|
| 2228 |
-
title: "Orders",
|
| 2229 |
-
folder: "user",
|
| 2230 |
-
description: ""
|
| 2231 |
-
},
|
| 2232 |
-
"user-profile": {
|
| 2233 |
-
name: "user-profile",
|
| 2234 |
-
filename: "profile.html",
|
| 2235 |
-
file: "demo/landing/user/profile.html",
|
| 2236 |
-
url: "demo/landing/user/profile.html",
|
| 2237 |
-
title: "Profile",
|
| 2238 |
-
folder: "user",
|
| 2239 |
-
description: ""
|
| 2240 |
-
},
|
| 2241 |
-
"user-signup": {
|
| 2242 |
-
name: "user-signup",
|
| 2243 |
-
filename: "signup.html",
|
| 2244 |
-
file: "demo/landing/user/signup.html",
|
| 2245 |
-
url: "demo/landing/user/signup.html",
|
| 2246 |
-
title: "Signup",
|
| 2247 |
-
folder: "user",
|
| 2248 |
-
description: ""
|
| 2249 |
-
},
|
| 2250 |
-
"narrow-jumbotron":{name:"narrow-jumbotron", title:"Jumbotron", url: "demo/narrow-jumbotron/index.html", file: "demo/narrow-jumbotron/index.html"},
|
| 2251 |
-
"album":{name:"album", title:"Album", url: "demo/album/index.html", file: "demo/album/index.html", folder:"content"},
|
| 2252 |
-
"blog":{name:"blog", title:"Blog", url: "demo/blog/index.html", file: "demo/blog/index.html", folder:"content"},
|
| 2253 |
-
"carousel":{name:"carousel", title:"Carousel", url: "demo/carousel/index.html", file: "demo/carousel/index.html", folder:"content"},
|
| 2254 |
-
"offcanvas":{name:"offcanvas", title:"Offcanvas", url: "demo/offcanvas/index.html", file: "demo/offcanvas/index.html", folder:"content"},
|
| 2255 |
-
"pricing":{name:"pricing", title:"Pricing", url: "demo/pricing/index.html", file: "demo/pricing/index.html", folder:"ecommerce"},
|
| 2256 |
-
"product":{name:"product", title:"Product", url: "demo/product/index.html", file: "demo/product/index.html", folder:"ecommerce"}
|
| 2257 |
-
};
|
| 2258 |
-
|
| 2259 |
|
| 2260 |
let pages = defaultPages;
|
| 2261 |
-
|
| 2262 |
let firstPage = Object.keys(pages)[0];
|
| 2263 |
-
|
| 2264 |
-
|
| 2265 |
-
|
| 2266 |
-
|
| 2267 |
-
|
| 2268 |
-
|
| 2269 |
-
|
| 2270 |
-
Vvveb.
|
| 2271 |
-
Vvveb.
|
| 2272 |
-
Vvveb.
|
| 2273 |
-
|
| 2274 |
-
Vvveb.
|
| 2275 |
-
Vvveb.
|
| 2276 |
-
|
| 2277 |
-
Vvveb.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2278 |
</script>
|
| 2279 |
</body>
|
| 2280 |
</html>
|
|
|
|
| 23 |
return originalSaveAjax.call(this, data, saveUrl, callback, error);
|
| 24 |
};
|
| 25 |
}
|
| 26 |
+
|
| 27 |
+
// Check if we need authentication for the editor
|
| 28 |
+
fetch('save.php?action=checkAuth', {
|
| 29 |
+
method: 'GET',
|
| 30 |
+
credentials: 'include'
|
| 31 |
+
}).then(response => {
|
| 32 |
+
if (response.status === 401) {
|
| 33 |
+
// Redirect to config page which will handle authentication
|
| 34 |
+
window.location.href = 'config.php';
|
| 35 |
+
}
|
| 36 |
+
}).catch(err => {
|
| 37 |
+
console.log('Auth check failed, continuing anyway');
|
| 38 |
+
});
|
| 39 |
});
|
| 40 |
</script>
|
| 41 |
</head>
|
|
|
|
| 431 |
<option value="active">active</option>
|
| 432 |
<option value="nth-of-type(2n)">nth-of-type(2n)</option>
|
| 433 |
</select>
|
| 434 |
+
</div>
|
| 435 |
</div>
|
| 436 |
</div>
|
| 437 |
|
|
|
|
| 1836 |
<script src="libs/autocomplete/jquery.autocomplete.js"></script>
|
| 1837 |
-->
|
| 1838 |
<script>
|
| 1839 |
+
// Override default pages to use a safe fallback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1840 |
let defaultPages = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1841 |
"blank": {
|
| 1842 |
name: "blank",
|
| 1843 |
+
filename: "blank.html",
|
| 1844 |
+
file: "new-page-blank-template.html",
|
| 1845 |
+
url: "new-page-blank-template.html",
|
| 1846 |
title: "Blank page",
|
| 1847 |
folder: null,
|
| 1848 |
+
description: "New blank page template"
|
| 1849 |
+
}
|
| 1850 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1851 |
|
| 1852 |
let pages = defaultPages;
|
|
|
|
| 1853 |
let firstPage = Object.keys(pages)[0];
|
| 1854 |
+
|
| 1855 |
+
// Initialize with error handling
|
| 1856 |
+
try {
|
| 1857 |
+
Vvveb.Builder.init(pages[firstPage]["url"], function() {
|
| 1858 |
+
console.log('VvvebJs builder initialized successfully');
|
| 1859 |
+
});
|
| 1860 |
+
|
| 1861 |
+
Vvveb.Gui.init();
|
| 1862 |
+
Vvveb.FileManager.init();
|
| 1863 |
+
Vvveb.SectionList.init();
|
| 1864 |
+
Vvveb.TreeList.init();
|
| 1865 |
+
Vvveb.Breadcrumb.init();
|
| 1866 |
+
Vvveb.CssEditor.init();
|
| 1867 |
+
|
| 1868 |
+
Vvveb.FileManager.addPages(pages);
|
| 1869 |
+
Vvveb.FileManager.loadPage(pages[firstPage]["name"]);
|
| 1870 |
+
Vvveb.Gui.toggleRightColumn(false);
|
| 1871 |
+
Vvveb.Breadcrumb.init();
|
| 1872 |
+
|
| 1873 |
+
console.log('VvvebJs initialized successfully');
|
| 1874 |
+
} catch (error) {
|
| 1875 |
+
console.error('Error initializing VvvebJs:', error);
|
| 1876 |
+
// Show user-friendly error message
|
| 1877 |
+
document.body.innerHTML = `
|
| 1878 |
+
<div style="max-width: 600px; margin: 100px auto; padding: 40px; text-align: center; background: #f8f9fa; border-radius: 10px;">
|
| 1879 |
+
<h2>🛠️ Editor Loading...</h2>
|
| 1880 |
+
<p>The visual editor is initializing. If this message persists, please check:</p>
|
| 1881 |
+
<ul style="text-align: left; margin: 20px 0;">
|
| 1882 |
+
<li>Browser console for errors</li>
|
| 1883 |
+
<li>Network connectivity</li>
|
| 1884 |
+
<li>Required files are properly uploaded</li>
|
| 1885 |
+
</ul>
|
| 1886 |
+
<a href="config.php" class="btn btn-primary" style="margin: 10px; padding: 12px 24px; background: #007bff; color: white; text-decoration: none; border-radius: 5px;">⚙️ Check Configuration</a>
|
| 1887 |
+
<a href="index.html" class="btn btn-secondary" style="margin: 10px; padding: 12px 24px; background: #6c757d; color: white; text-decoration: none; border-radius: 5px;">🏠 Return Home</a>
|
| 1888 |
+
</div>
|
| 1889 |
+
`;
|
| 1890 |
+
}
|
| 1891 |
</script>
|
| 1892 |
</body>
|
| 1893 |
</html>
|
new-page-blank-template.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<title>New Page</title>
|
| 7 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="container-fluid">
|
| 11 |
+
<section class="py-5">
|
| 12 |
+
<div class="container">
|
| 13 |
+
<div class="row">
|
| 14 |
+
<div class="col-lg-12">
|
| 15 |
+
<h1 class="display-4">Welcome to Your New Page</h1>
|
| 16 |
+
<p class="lead">This is a blank template. Start building your website by adding components and sections.</p>
|
| 17 |
+
<hr class="my-4">
|
| 18 |
+
<p class="mb-4">Use the visual editor to drag and drop components, customize styles, and create beautiful pages.</p>
|
| 19 |
+
<a class="btn btn-primary btn-lg" href="#" role="button">Get Started</a>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
</div>
|
| 23 |
+
</section>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
| 27 |
+
</body>
|
| 28 |
+
</html>
|