Integrating JW Player with Rich Text Editor

By TA Digital Marketing Team 2 min read

This post will show how videos can be added to a Rich Text field using the Rich Text Editor. Videos can be added from Media Library or a CDN. The width and height of the video can be set while adding the video. Videos are displayed on the website with JWplayer.

The solution is to create a custom button on the Rich Text Editor which, on click, will show a popup to enter video details and add video to content. The following high-level steps illustrate how the solution can be implemented.

Step 1: Create an Editor Button item in the Core database

Create a copy of Rich Text Default toolbar and insert a Html Editor Button.The data source property of the Rich Text field should be set to the newly created profile.
jwplayer_image_1

Step 2: Shell Implementation

Add the corresponding XML file (InsertVideo.xml) to the folder \sitecore\shell\Controls\Rich Text Editor. This file will set the video width and height and call the JavaScript code to pop up the dialog to enter video details.

Step 3: Create a config file that includes the Rich Text commands JavaScript file

This config file is placed in the App_Config\Include folder.

Step 4: Create a JavaScript file to add JWplayer code

Add the references of jQuery and JWplayer to the layout.

Step 5: Add video to content using Rich Text Editor

On clicking the video icon in the Rich Text Editor, it will show a popup where the user can enter details of the video.
jwplayer_image_2

Step 6: Save and publish the item to render the video on the page

After the data is entered, click the Link button. This will add a Video tag to the content in the Rich Text field.

Explore Additional Resources

Learn how you can select the best Digital Experience platform for your business.

Our Certified Sitecore Experience Platform and Sitecore MVP’s specialize in helping you deliver seamless contextually personalized customer experiences.

Our User Experience (UXD) Practice designs thoughtful, engaging, user-centric websites that drive conversions.

GET HELP FROM OUR EXPERTS

Over the past 19 years, we have completed thousands of digital projects globally. We have one of the largest and deepest multi-solutions digital consulting teams in the world. Our proprietary processes and years of Digital Experience expertise have earned us a 97% customer satisfaction rating with our clients ranging from Global Fortune 1000 to Mid-Market Enterprises, leading educational institutions, and Non-Profits.

For further assistance to Integrating JW Player with Rich Text Editor on Sitecore Contact Us.

About TA Digital

TA Digital is the only global boutique agency that delivers the “best of both worlds” to clients seeking to achieve organizational success through digital transformation. Unlike smaller, regional agencies that lack the ability to scale or large organizations that succumb to a quantity-over-quality approach, we offer resource diversity while also providing meticulous attention to the details that enable strategic success.

Over the past 20 years, TA Digital has positioned clients to achieve digital maturity by focusing on data, customer-centricity and exponential return on investment; by melding exceptional user experience and data-driven methodologies with artificial intelligence and machine learning, we enable digital transformations that intelligently build upon the strategies we set into motion. We are known as a global leader that assists marketing and technology executives in understanding the digital ecosystem while identifying cultural and operational gaps within their business – ultimately ushering organizations toward a more mature model and profitable digital landscape.

Recognized in 2013, 2014, 2015, and 2019 Inc. 5000 list as one of the most successful technology companies in the United States, TA Digital is pleased also to share high-level strategic partnerships with world class digital experience platform companies like Adobe, SAP and Salesforce and possess global partnerships with industry leaders such as Sitecore, Episerver, Elastic Path, BigCommerce, AWS, Azure and Coveo.

TA Digital Marketing Team

Written By

TA Digital Marketing Team

More Blogs by the author

12 ways AI is transforming DevOps
12 Ways AI is Transforming DevOps TA Digital Marketing Team 5 min read