symptoms:

return key inserts double paragraph breaks : <p><br />return key</p><p>&nbsp;</p><p>&nbsp;</p>

text formats (bold, italic, underline) don't apply to selected text

list formats don't apply to selected text, but they do collapse the paragraph breaks and 'flicker' for a moment

undo doesn't appear to work

code cleaner doesn't appear to work

search & replace has stopped working (no pop-up window)

=======================================
these buttons are working as usual:
drupalimg_assist pop up works (benshell's version)
help popup works
emoticons pop up works
html popup works
fullscreen pop up works
link and unlink work

history:
I'm afraid I have been tinkering ;
I have applied all 3 recent patches for 4.6 (http://drupal.org/node/42452) and reversed patch#2 (28-12-2005) to see if that was the cause but no joy.
I am using the tinyMCE plugin drupalimage from http://drupal.org/node/32506 which could conceivably be interfering with the other .js's?

I really can't figure out what might be causing this.

I'm baffled - please does anyone have any suggestions?

Comments

JohnG-1’s picture

Title: tinymce : formatting stopped working - please help! » benshell's drupalimage/editor_plugin.js typo
Category: support » bug
Status: Active » Needs review

I tracked it down to the javavscript in benshell's drupalimage plug-in for tinyMCE.
I have posted the solution to Benshell's thread (you need to go to page 2!) http://drupal.org/node/32506#comment-98581

Apologies if I'm posting in the wrong place here but it took me ages to track down and I thought I might find the answer amonst tinyMCE issues so maybe someone else will too (?).

note this only applies to the benshell's version of img_assist
briefly, it was a simple typo in the drupalimage/editor_plugin.js line 178 :

- tinyMCE.switchClassSticky(editor_id + '_drupalimage', 'mceButtonNormal');
+ function tinyMCE.switchClassSticky(editor_id + '_drupalimage', 'mceButtonNormal');
JohnG-1’s picture

Status: Needs review » Closed (fixed)
JohnG-1’s picture

Status: Closed (fixed) » Fixed

oops, the /*function*/ patch above doesn't quite fix the problem ... it restores functioanlity to the ordinary buttons, but stops the drupalimage button from appearing!

my latest attempt is this: remove that whole line!

so it should look like:

function TinyMCE_drupalimage_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
	function getAttrib(elm, name) {
		return elm.getAttribute(name) ? elm.getAttribute(name) : "";
	}

//	tinyMCE.switchClassSticky(editor_id + '_drupalimage', 'mceButtonNormal');  /* it seems this whole line shouldn't be here! */

	if (node == null)
		return;

	do {
		// This code looks at the name of the image to see if the drupalimage button should be selected.
		// However, by default 'name' is not accepted by TinyMCE as a parameter for the img tag, so it must
		// be added using the initialization string.  As far as THIS code goes, it could look at 'className' 
		// instead, therefore avoiding this requirement, however the regular image button looks at the 
		// 'name' value to see if it starts with 'mce_'.  If it does, it considers it an internal image and 
		// does not highlight the regular image button.  If 'className' is used here instead, BOTH buttons
		// highlight when a drupalimage is selected.
		if (node.nodeName.toLowerCase() == "img" && getAttrib(node, 'name').indexOf('mce_plugin_drupalimage') == 0) {
			tinyMCE.switchClassSticky(editor_id + '_drupalimage', 'mceButtonSelected');
		}
	} while ((node = node.parentNode));

	return true;
}

This seems to work now - so far as I've tested it, both ordinary buttons and drupalimage button work as they should (better than ever! nice one Benshell!)

I just hope I haven't upset anything else!

Anonymous’s picture

Status: Fixed » Closed (fixed)