Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sandro 45 posts 118 karma points c-trib
    Sep 25, 2009 @ 11:32
    Sandro
    1

    tinymce (or umbraco) strips title attribute of img tags

    Hi,

    If I insert an image with the richtext editor and save/publish the node, somehow  the title attribute inside the img-tag gets deleted.

    I already set the TidyEditorContent to "False" in config\umbracoSettings.config

     

  • Sandro 45 posts 118 karma points c-trib
    Sep 29, 2009 @ 16:47
    Sandro
    0

    It's strange... because a fresh installed umbraco also deletes those img title attributes. But title attributes in <a>-tags are working :O

    I just browsed the umbraco config for valid elements for TinyMCE and found this:

    img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align]
    a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]

    Note the equal sign before the title attribute. But this seems to be correct. http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements#Default_rule_set:

    Any ideas?

     

  • Seth Niemuth 275 posts 397 karma points
    Sep 29, 2009 @ 18:51
    Seth Niemuth
    0

    Sandro,

    I have had similar problems to this. I had to add 'rel=0'?

    The full forum discussion: http://forum.umbraco.org/yaf_postst4580_TinyMCE-stripping-out-img-id-attributes.aspx

  • Donald St. Martin 83 posts 128 karma points
    Apr 22, 2010 @ 18:15
    Donald St. Martin
    5

    In order to get the title tag to show,

    1) Open umbracoSettings.config in the config folder
    2) Towards the top, you should see <allowedAttributes> under <imaging>
    3) Change

    <allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes> 

    to

    <allowedAttributes>alt,title,border,class,style,align,id,name,onclick,usemap</allowedAttributes>

     

    4) Touch the web.config or recycle the application pool to restart Umbraco

    Enjoy!

    --
    Donald

  • Tim 4 posts 24 karma points
    Apr 22, 2010 @ 20:37
    Tim
    0

    That fix worked on our installation of Umbraco. Thanks!

  • TheDude 1 post 21 karma points
    Feb 03, 2012 @ 16:50
    TheDude
    0

    This is happening with Umbraco 5. Is there a new method to fix this issue?

  • John Lilly 1 post 21 karma points
    Jul 22, 2013 @ 21:39
    John Lilly
    0

    Thanks Donald. This fix also worked for me.

  • Matt Haynes 1 post 21 karma points
    Oct 02, 2014 @ 19:17
    Matt Haynes
    0

    Hi guys,

    I've tried the above and I still not getting a title attribute in my img tags.  

    My tinyMceConfig.config allows title as a valid element.

    If I add one in manually once I've inserted an image via the source editor then is remains there when it is published and viewed.  I think it is being ommitted or stripped out by one of the following

    • Umbraco\Plugins\Tinymce3\insertImage.aspx
    • Umbraco_Client\Tinymce3\Plugins\Umbracoimg\Js\image.js
    I tried following this but it hasn't seemed to help:

    Any help would be greatly appreciated :-)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies