Simon Wakeman - marketing, public relations and digital communications

Simon has worked for our company on several occasions over many years. He has constantly delivered the desired outcomes, on time and to budget. Nick Bentley, Ether-Ray

Simon has worked for our company on several occasions over many years. He has constantly delivered the desired outcomes, on time and to budget. Nick Bentley, Ether-Ray

Simon’s passion and enthusiasm for all things digital is infectious. He has a great ability to keep his focus on clients’ big strategic issues, while keeping calm and motivating the team around him. It’s always a pleasure to work with him. Rishi Dastidar

Very capable manager with great attention to detail. Great fun to work with too. Damon Reynolds

Using a WYSIWYG editor in Textpattern

Hello - welcome to my website.

On my blog I write about marketing, public relations and digital communications. To keep up-to-date with my posts you may want to subscribe to my RSS feed or sign-up to receive blog posts by email.

Thanks for visiting and I hope you find my site useful.

A while back I discovered the excellent X-Standard WYSIWYG editor. Up to then I’d been disappointed with the quality of code produced by WYSIWYG editors, but the X-Standard editor produces clean XHTML and integrates well with CSS.

Having been impressed with the editor and having used it in other content management systems I thought I’d have a go integrating it into Textpattern - whilst Textile is easy and quick to learn, clients seem to want WYSIWYG editors. This might not be everyone’s idea of how Textpattern should work, but if it helps someone then it’s worth sharing here.

A screenshot is available - the width of the editor can be changed in the code inserted into txp_article.php.

It was easier than I thought - I’ve summarised the steps I took below - and please make back-ups in case it goes wrong for you..

1. Download and install the X-Standard editor on your machine

2. Turn off Textile completely in the admin section of Textpattern

3. Edit /textpattern/lib/txplib_head.php and add the code in this file into the header section (around line 30)

4. Edit /textpattern/include/txp_article.php - around line 473 you'll find a textarea field that is the main editor box comes from. Comment out (or delete) this line and replace with the code in this file.

5. Log into Textpattern and the main body of articles should be displayed using the WYSIWYG editor. It shouldn’t take 5 minutes to do the same for the excerpt, but I haven’t had a chance to do that yet.

I did this Textpattern 1.0rc1, so you may need to check the line numbering and PHP code carefully if you’re using an older or newer version, but the principles will be the same.

Simon Wakeman

I've been on the web since 2001 and have been blogging about marketing and public relations since January 2006.

I'm currently Head of Marketing at Medway Council as well as a freelance marketing and PR consultant.

The content and opinions expressed on this website are not endorsed by nor reflect the views of any company or organisation I work with.

Recent blog posts
More interesting stuff on the web »
Just a couple of interesting links thanks to a lazy Christmas holiday.

More interesting stuff on the web this week »
A bumper round-up of interesting content I've seen on the web in the past few days.

Marketing and public relations students take note »
If you're thinking of offering me money to write your marketing and public relations assignments, don't bother.

How the credit crunch affects media consumption »
How does the credit crunch affect media consumption and the marketing mix?

A brilliant resource for public sector social media »
Steph Gray has created a superb tool for collecting examples of public sector social media in the UK.