JSFiddle - React, Tailwind, and code Playground

by Talha Awan

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<div ng-app="myApp" ng-controller="MyCtrl">
    <input type="text" value=" text " ng-model="data.text" ng-trim="false" />
    
    <pre>{{ data | json }}</pre>
    
    
  <p contenteditable="true" ng-change="changed()"><span class="spaces">&nbsp;</span>{{data.editable}} <span class="spaces">&nbsp</span></p> 
 

</div>

CSS

.content {
  backgnd-color: lightgrey !important
}

JavaScript

var myApp = angular.module('myApp', [])
    .controller('MyCtrl', MyCtrl);

function MyCtrl($scope) {
    var radio = document.getElementById('radio');

    $scope.data = {
        text: ' text ',
        editable: "abc"
    };
    
    $scope.changed = function(){
    alert("changed")
    }
    
    
    
}