20 April, 2017

Unable to add background image issue in Sitecore Rich Text Editor


Recently I was working on project built with Sitecore 8.1 update 1, and I faced issue with Rich text editor prevent me from create HTML content with background image :
  • Add  HTML that contains div with background image using " HTML editor ":
  • Then switch to " Show editor or try to edit anything, the background automatically trimmed from content into this :


However, I tried to add url link to the background image, but I had the same issue. So I contacted the Sitecore support, and they provided a solution and .dlls fix, also this issue has registered as a bug with reference number 145733 in Sitecore.

Solution:

  Sitecore uses a third party component from Telerik for its rich text editor, and using a more recent version of Telerik libraries helps to solve the issue. 
  1. Download dll files [ Telerik.Web.UI.zip ] and [ Telerik.Web.UI.Skins.zip] from link https://goo.gl/8tvb5N
  2. Extract .dll files and copy into your /bin folder, replacing the old assemblies;
  3. Edit your web.config files in the following way:
....

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

       <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
        <bindingRedirect oldVersion="2015.1.401.45" newVersion="2017.1.118.45" />

      </dependentAssembly>


      <dependentAssembly>
        <assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" />
        <bindingRedirect oldVersion="0.0.0.0-2.9.4.0" newVersion="3.0.3.0" />
      </dependentAssembly>

....


I hope that was helpful for you ! please do not hasitate to comments or contact me if you have any question. 🌺


Baraa Masri
Email: Bmasri@tanasuk.com
Twitter: @Bara_Masri




2 comments:

  1. I thought in Sitecore 10 it would be auto solved, but please help how to solve for Sitecore 10 as in Sitecore 10 Dll version is 2020 whearas dll attached here which solved issue in 8.2 was in 2017 version - we can't downgrade the dll version so.

    ReplyDelete