Adding a class to a link in text editor

Posted: June 08, 2018 at 2:05 PM Quote #205456
I am using 3.9. When I navigate to a topic page or product page and try to enter certain classes into the source code (from the tools menu), the classes are removed once I click ok. For example, I will try to put <a class="someclass" href="#"></a> but it does not stay that way. Can someone tell me why this is? My solution is to create topic page templates but that is pretty time consuming and limited when I have to change certain things across the site.  Any help would be appreciated.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: June 08, 2018 at 2:34 PM Quote #205459
Hello,

Try setting 'True' for 'adminareasettings.richeditorallowjavascript' from Configuration -> All settings in admin.

This should work. If you don't find a solution either, let us know. We have used same on our website too.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Need any professional assistance? Drop us your requirements on [email protected] or Skype @ live:nopadvance.sales

Thank you,
nopadvance.com | nopCommerce Solution Partner
Posted: June 08, 2018 at 2:58 PM Quote #205461
I should specify, sorry. The code I am trying to use is something like this:

                <a href="/page1" >
                    <div class="someClass">
                        <img src="Content/Images/uploaded/image1.jpg" alt="Image 1" class="hoverImage">
                        <div class="hoverOverlay">
                            <div class="hoverText">SOME TEXT GOES HERE
                            </div>
                       </div>
                    </div>
                </a>


In this example, the <a> gets removed even before I click save.  The javascript setting seems to not apply to this.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: June 08, 2018 at 9:48 PM Quote #205471
Hello,

You need to set following value for setting 'adminareasettings.richeditoradditionalsettings' from admin -> Configuration -> All settings.

Value: settings.valid_children= '+a[div|i|span|img|p|ul|ol|li|h1|h2|h3|h4|h5|h5|h6]';

This works like charm. Let us know if you have other issues.

Thank you,
Atul
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Need any professional assistance? Drop us your requirements on [email protected] or Skype @ live:nopadvance.sales

Thank you,
nopadvance.com | nopCommerce Solution Partner
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2018
Learn more