Jump to ContentJump to Navigation/Login
` ` ` ` ` `

[Register]

Occasional ATutor release updates


No Members Logged In

(4 guests in past 15 min.)

Access Understanding Web Accessibility to learn about accessibility, or Register to take the course for FREE.

Support Forums

ATutor Support

class="____" and title="___" are stripped from link tags with WYSIWYG editor


You must be signed-in to post.

AuthorSubject
  Page: 1
gtilflm
Subject: class="____" and title="___" are stripped from link tags with WYSIWYG editorQuote this post in your reply
Hello. I recently installed 2.0 and I've noticed that WYSIWYG editor doesn't allow for using class and title attributes in <a href......></a> links. The previous version I had (1.6.3) did the same thing.

For example, something like:

<a class="thickbox" title="Unit 9, Lesson 3" href="../restoflink/page.html?keepThis=true&TB_iframe=true&height=680&width=1105">

Would be replaced by the editor as:

<a href="../restoflink/page.html?keepThis=true&TB_iframe=true&height=680&width=1105">



Any thoughts on this?

Thanks
Posted: 2010-07-31 22:15:30
greg

Avatar for greg
Subject: Re: class=Quote this post in your reply
This might be something to bring up with the TinyMCE people.

tinymce.moxiecode.com/


For now you'll need to turn off the WYSIWYG editor.
Posted: 2010-08-01 10:49:26
gtilflm
Subject: Re: class=Quote this post in your reply
Found the fix for this problem.

In ATutor/include/lib/tinymce.inc.php, you need to add "class" into the list of "extended_valid_elements".

The final code should look like...


<?phpextended_valid_elements "a[<span style="color: red;">class|</span>name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
?>





Cheers.
Posted: 2010-08-02 03:54:17
gtilflm
Subject: Re: class=Quote this post in your reply
I was trying to highlight the "class" part in red and apparently that doesn't jive well with php code being displayed on the forum.

The proper final code should look like...


<?php
extended_valid_elements 
"a[class|name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
?>


Posted: 2010-08-02 03:56:12
greg

Avatar for greg
Subject: Re: class=Quote this post in your reply
Good catch, thx

www.atutor.ca/atutor/mantis/view.php?id=4445
Posted: 2010-08-02 08:43:10
harris

Avatar for harris
Subject: Re: class=Quote this post in your reply
fixed in patch #4.
Posted: 2010-08-04 16:00:13
 Page: 1

You must be signed-in to post.