Underline format problem

风流意气都作罢 提交于 2019-12-05 11:10:44

The real answer here turned out to be:

http://tinymce.moxiecode.com/wiki.php/Plugin:legacyoutput
(see comments)


I don't know whether this is correct, I'm just reiterating what I found here:

Firstly, you're warned that:

<u> is deprecated.

Then:

Disable inline_styles option.
Inline styles converts most attributes into CSS style attributes - so it will use span tags rather than <u>, <strike>, etc. So, disabling this option (which is now enabled by default) gives the behaviour you're looking for.

Alternatively:

This will do it:

tinyMCE.init({
    ...
    formats : {
        underline : {inline : 'u', exact : true}
        }

...

Good luck!

Thanks for this, I also need the <u> tags for SSRS 2008 reports which do not support the new <span style="text-decoration: underline;"> tag.

This combination worked for me:

inline_styles: false,
formats: {
    underline: { inline: 'u', exact : true }
}

Works here?

http://jsfiddle.net/dFY6r/

Also u tags are deprecated, along with b and i that is why we use CSS now:

.className {
    text-decoration: underline;
    font-weight: bold;
    font-style: italic;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!