Formatting for task descriptions

Thanks to Sawan for this suggestion – don’t know why nobody thought of this earlier

Anyway, have just finished integrating TinyMCE with task descriptions in NetOffice. So now you can add lists, include hyperlinks, stikeout previous instructions etc etc!

Screenshot - format edittasks

A couple of things have been changed:

  1. Obviously, TinyMCE files need to be copied into your NetOffice installation.
  2. We have added a file called tinymce.php to the /includes/ directory. It only contains Javascript, but we’ve used a PHP include so we can pass variables to it later if we like. That will mean we can enable or disable certain buttons dynamically depending on other page variables.
  3. This file is called in the head of the page, so /themes/deepblue/header.php has been adjusted accordingly. If you’re using another theme, change your header.php to include /includes/tinymce.php.
  4. Then obviously /tasks/edittask.php has been adjusted – basically just giving the textareas id attributes so TinyMCE can find them. There is also a little bit of code at the top of that file that calls a function to convert to their HTML entities, which we don’t want any more! So that’s just been commented out for now.

That all might sound scary, but if you’re using the standard Deep Blue theme that comes with NetOffice 2.6, all you need to do is unzip the following file into your NetOffice directory. I’ve even included TinyMCE so it should be pretty straight forward.

This is only tested with NetOffice 2.6 – I have no idea what will happen on earlier versions.

Also… just in case, make sure you back up your NetOffice installation so you can roll back if needed…


2 thoughts on “Formatting for task descriptions

  1. Just noticed a bug when you create a new task and have uploaded a new file… If you downloaded before this comment was posted then re-download from the same link and overwrite the previous files.


  2. Sorry… just found anotherie…

    Commenting out the code that replaces the turned out to be a bad idea, as quotes etc also need to be dealt with. So I’ve added an extra function to /includes/library.php to ignore but convert/excape other problematic characters.

    Zip file had been updated.

Comments are closed.