DeeEmm

Pragmatism in code

Home

Waxing lyrical about life the universe and everything software related since lunchtime 2006.
This tag contain 1 private blog which isn't listed here.

Syntax highlighting code in TinyMCE

After a recent tutorial a member mailed me to let me know that the code snippets were not displaying correctly. A quick look told me that this was due to my use of the pre tag, which prevented the text from breaking when it reached the bounds of it's containing element.

The fix was relatively easy - add the following hacks to force the text to wrap for pre formatted text...

word-wrap: break-word; /* Internet Explorer 5.5+ */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: pre-wrap; /* css-3 */

But this got me thinking, and jarred my memory to something I was working on a little while back.

I had previously taken a look at syntax highlighting for WYSIWYG editors, this was for use in the DMCMS project where i wanted to allow full editing of template files from within the Admin panel. This is something that I had implemented on an earlier development version but had then abandoned. (For some reason that i can no longer remember)

Continue reading
  7995 Hits
  0 Comments
7995 Hits
0 Comments

Add Youtube video button to TinyMCE

Not strictly a Dolphin modification, as it applies to TinyMCE in general, but I will outline it here for Dolphin 7. It's a pretty easy modification to do, just two files to edit.

The functionality for this is already in TinyMCE, but for some reason it is not enabled. I've tested this out on version 7.0.2 with no issues.

To enable YouTube /flash video button in the forums

Edit

Continue reading
  13784 Hits
  4 Comments
13784 Hits
4 Comments

Dophin 7 TinyMCE Browser MOD updated

The DeeEmm Dolphin Tiny MCE Browser modification has now been updated to work with the new Dolphin 7.0.1 release.

This release is a compatibility update, There are no additional features or bugfixes included.

If you have previously purchased the 7.0.0 version, you will be pleased to know that you are entitled to a free update. If you would like a copy of the updated files, please email me and i will send a copy out to you.

As usual, support for purchasers of our premium modifications are all entitled to access to the help-desk for priority 1-on-1 support. General support, bug reports, and feature requests can be posted to the forums.

Continue reading
  2128 Hits
  0 Comments
2128 Hits
0 Comments

TinyMCE - add items to style drop down

If you have to display code snippets on your Joomla site, you might find that the following mod is of help. This quick mod will allow you to add items to the styles drop down in the TinyMCE editor - in this case a style for the code class.

The mod is pretty straight forward.

Normally when TinyMCE is called it looks for a stylesheet called 'editor.css' in the default templates CSS folder. The contents of this are used to propagate the styles drop down. If this file is not found in the default templates CSS folder, then the system version is used instead. To add custom styles to the drop down, simply create the following file. (where current_template is the name of your template)

/templates/current_template/css/editor.css

Continue reading
  9844 Hits
  0 Comments
9844 Hits
0 Comments