JSFiddle - React, Tailwind, and code Playground
HTML
<div>Tags: <span contenteditable="true" id="tags">Test</span></div>
<div>Date: <input type="text" id="date"></div>
JavaScript
(function ($) {
var original = $.fn.val;
$.fn.val = function() {
if ($(this).is('*[contenteditable=true]')) {
return $.fn.html.apply(this, arguments);
};
return original.apply(this, arguments);
};
})(jQuery);
$(function() {
var availableTags = ["Hallway","Kitchen","Bathroom","Lounge"];
$("#tags").autocomplete({
source: availableTags
});
$( "#date" ).datepicker();
});