ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


class and title are stripped from link tags with WYSIWYG editor


  • 2010-07-31 22:15:30

    class and title are stripped from link tags with WYSIWYG editor

    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

  • 2010-08-01 10:49:26

    Re: class=

    This might be something to bring up with the TinyMCE people.

    http://tinymce.moxiecode.com/


    For now you'll need to turn off the WYSIWYG editor.

  • 2010-08-02 03:54:17

    Re: class=

    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...

    [php]extended_valid_elements : "a[[red]class|[/red]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]",
    [/php]


    Cheers.

  • 2010-08-02 03:56:12

    Re: class=

    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]",
    [/php]

  • 2010-08-02 08:43:10

    Re: class=

    Good catch, thx

    http://www.atutor.ca/atutor/mantis/view.php?id=4445

  • 2010-08-04 16:00:13

    Re: class=

    fixed in patch #4.