Copied to clipboard

Flag this post as spam?

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


  • Gabriel Boceanu 6 posts 26 karma points
    May 29, 2012 @ 12:30
    Gabriel Boceanu
    0

    HTML Tags not importing in Rich text editor

    Hi,

    I'm curently using the CMS Import 4.7.2 and I want to import some rich text content form an Sql database.

    The problem is, that when I try to import the data to the rich text editor, all the html tags like <b>, <i> etc are striped out from the original text.

    I would like to know if this is a general problem or if it's related only to the free edition.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    May 29, 2012 @ 12:38
    Richard Soeteman
    0

    Hi Gabriel,

    This is not related to CMSImport but to the editor. Some tags are stripped out automatically. Check the /config/tiny_mce.config  file and make sure b and I tags are in the validElements section.

    Hope this helps you,

    Richard

  • Gabriel Boceanu 6 posts 26 karma points
    May 29, 2012 @ 12:44
    Gabriel Boceanu
    0

    Hi Richard,

     

    Thank you for your fast reply. 

     

  • Gabriel Boceanu 6 posts 26 karma points
    May 29, 2012 @ 13:28
    Gabriel Boceanu
    0

    Hi Richard,

    As you said, I verified the tinyMce Config file, and the relevant html tags are permited.

    If so, why are not imported to the rich text editor via CMS Import?

    This is the Valid Elements definition from my tinymce config file:

    <validElements>

        <![CDATA[+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|

    ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],

    -strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,

    img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel],

    -sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],

    -tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],

    thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],

    -th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],

    -span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align],-h2[id|dir|class|align],

    -h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],

    dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[classid|width|height|codebase|*],

    param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button,iframe[*]]]>

      </validElements>

     

     

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    May 29, 2012 @ 13:35
    Richard Soeteman
    0

    Weird,

    what happens when you paste the data directly in tinyMCE?

  • Gabriel Boceanu 6 posts 26 karma points
    May 29, 2012 @ 13:55
    Gabriel Boceanu
    0

    Yes,

     

    I pasted directly and all the tags, except <br /> and <a></a>, are removed, from what I checked so far.

    So it seems that the problem is at the rich text editor. Do you have any sugestions of why it behaves like that?

     

    Thank you very much for you help so far.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    May 29, 2012 @ 15:01
    Richard Soeteman
    0

    Weird, could it be that your config file got corrupted somehow? maybe change it back to the original one and see what you can put in there

  • Gabriel Boceanu 6 posts 26 karma points
    May 29, 2012 @ 15:32
    Gabriel Boceanu
    0

    The config/ wasn't corrupted.

    I managed to fix the issue. The problem was that the editor was choosing by default only the strong or em tag and removed any <b> or <i> tags(-strong/-b[class|style],-em/-i[class|style]). The new definition in the valid elements (-strong[class|style],-b[class|style],-em[class|style],-i[class|style]) resolved the issue. But still it should have not striped the b or i tags.

  • hrg 32 posts 152 karma points
    Apr 02, 2017 @ 06:42
    hrg
    0

    hey .... I am getting the same issue but for 'rel' attribute... how can I solve the same?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Apr 03, 2017 @ 05:56
    Richard Soeteman
    0

    Hi See my earlier solution. You need to add it to the tinymce config of Umbraco.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft