Search code examples
tinymceumbracoumbraco7rich-text-editorrte

Umbraco Tinymce adding spaces to empty tags


Whenever I add some tags like <i></i> to use with awesome font or simply a <p></p> tag tinymce automatically adds a space in between the tags. I have searched around the internet but couldn't find any solution.

Another solution would be to remove the spaces with javascript but that is a solution I want to keep as a last resort.


Solution

  • I recently had the same problem and finally found a solution. In the tinyMceConfig.config on the bottom u find:

    <validElements></validElements>
    

    In there find the:

    -em/-i[class|style]
    

    element and change it to:

    -em[class|style],i[class|id|style]
    

    Then in your ClientDepency.config change your version with +1 so if it is 1 now change it to 2:

    <clientDependency version="2" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
    

    Hope this helped!