"In line" (?) WYSIWYG HTML editor
September 15, 2014 8:39 AM   Subscribe

Does anyone know if there exists a website where you can insert a PHP code snippet which pulls through content you have created on a CMS? Basically I'm looking to allow a customer to be able to edit text and bullet lists, captions etc on a static website I hand-coded for him years ago.

It would be very labour intensive to convert the whole thing to WYSIWYG with for WordPress or ExpressionEngine - but if just discrete text-based parts of the website could be editable, that'd work really well.

I have tried to Google for this (promise!) but I must not be using the right search terms...

thank you..
posted by dance to Computers & Internet (6 answers total) 3 users marked this as a favorite
 
I use TinyMCE.
posted by Doofus Magoo at 9:13 AM on September 15, 2014


CKEditor is also decent.

Another alternative would be to use Markdown and something like Parsedown.

(I tend to find that when clients use WYSIWYG it can get a bit ugly - they c&p stuff in from Microsoft Word with lots of hinky formatting etc).
posted by Hartster at 9:24 AM on September 15, 2014


You want this PHP snippet on your hand-coded website to pull content from somewhere else? Where would this content be stored? In a database? In a file? On another website?
posted by Aleyn at 9:47 AM on September 15, 2014


Perch CMS is perfect for this case.
posted by clearlydemon at 10:14 AM on September 15, 2014 [1 favorite]


Here is a 5-minute set up I used when a CMS was too heavy:

1. Google doc for the end user. The two boundaries that say "DO NOT TOUCH THIS LINE" in bold are what it says on the tin, everything in between they are free to edit and format.

2. PHP snippet to get the content of the google doc:

$delimiter = 'DO NOT TOUCH THIS LINE';

$result = file_get_contents("https://docs.google.com/document/d/1TY0-7pa4ZbVuL-afPiBK-pMbZgHtjKNga30LfumJow4/pub");

$start = stripos($result, $delimiter);
$end = strripos($result, $delimiter);

$content = html_entity_decode(str_replace($delimiter, '', substr($result, $start, $end - $start)));

3. And finally plop this in to display the content:

echo $content;

End result is here. FYI weird spacing and lack of styling is how they typed it into the google doc, the code does preserve spaces, line breaks and formatting.
posted by rada at 10:14 AM on September 15, 2014 [2 favorites]


For this particular case, as I understand it.

1. You have an existing site with static pages.
2. You do not intend to migrate to a content management system.
3. You would like a normal human person to be able to edit sections of the website.

I have liked Adobe Contribute for this for a lot of years. There's a desktop app a user can install for Mac or Windows and then you do setup with FTP. You add html comments before and after any section you want them to be able to edit. Very straightforward for clients who can do desktop apps.

Here's your question, asked by me 4 years ago on the webmasters stackexchange: Allowing customers to edit static website via WYSIWYG. The best answers included plaudits for CushyCMS. I did try it out back in 2010 and it was good and useful. I don't have long term experience with Cushy as most of my customers have migrated to WordPress or DIY sites like wix or squarespace.

Hope that helps!
posted by artlung at 11:58 AM on September 15, 2014 [1 favorite]


« Older Can I salvage my headshot?   |   Glasses adjustment in Portland? Newer »
This thread is closed to new comments.