PHPackages                             rhildred/editable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rhildred/editable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rhildred/editable
=================

0722PHP

Since Jan 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/rhildred/editable)[ Packagist](https://packagist.org/packages/rhildred/editable)[ RSS](/packages/rhildred-editable/feed)WikiDiscussions gh-pages Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

editable
========

[](#editable)

composer installable module for editable markdown on a web page. There is a [partial demo here](https://rhildred.github.io/editable). To use in a project, `"require": {"rhildred/editable": "dev-master"}` in your composer.json file.

add an .htaccess in a folder named www in your repository:

```
AddHandler application/x-httpd-php .phtml
RewriteEngine On

RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
RewriteRule ^(.*)$ - [E=BASE:%1]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.%{TIME_YEAR}.html -f
# Rewrite /foo/bar to /foo/bar.html
RewriteRule ^(.*)$ %{REQUEST_URI}.%{TIME_YEAR}.html [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.html -f
# Rewrite /foo/bar to /foo/bar.html
RewriteRule ^(.*)$ %{REQUEST_URI}.html [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
# Rewrite /foo/bar to /foo/bar.php
RewriteRule ^(.*)$ %{REQUEST_URI}.php [L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}index.%{TIME_YEAR}.html -f
# Rewrite /foo/bar to have it compiled to a new php file
RewriteRule ^(.*)$ %{REQUEST_URI}index.%{TIME_YEAR}.html [L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}index.html -f
# Rewrite /foo/bar to have it compiled to a new php file
RewriteRule ^(.*)$ %{REQUEST_URI}index.html [L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}index.php -f
# Rewrite /foo/bar to have it compiled to a new php file
RewriteRule ^(.*)$ %{REQUEST_URI}index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite /foo/bar to have it compiled to a new php file
RewriteRule ^(.*)$ %{ENV:BASE}indexTransform.php/$1 [L]

```

Then you will also need some sort of routing. I added slim to my composer.json file:

```
"require":{
    "rhildred/editable":"*",
    "slim/slim": "*"
}

```

Also in the www folder I added:

```
