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.
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.
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.
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.
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
Hi Richard,
Thank you for your fast reply.
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>
Weird,
what happens when you paste the data directly in tinyMCE?
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.
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
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.
hey .... I am getting the same issue but for 'rel' attribute... how can I solve the same?
Hi See my earlier solution. You need to add it to the tinymce config of Umbraco.
Best,
Richard
is working on a reply...