I am using "froala" Editor for changing inline text,here is the link
Every thing is working fine except it removing the div/p/span etc attributes. here is my function
$('div#eg-custom-toolbar').editable({
inlineMode: false,
buttons: ['undo', 'redo' , 'sep', 'bold', 'italic', 'underline']
})
});
before:
<div contenteditable="true" ng-style="{'color' : styleArr[6]['scopval']}" ng-bind-html="banner_text3" ng-model="banner_text3" ng-mouseleave="hoverOut('banner_text3')" ng-mouseover="hoverIn('banner_text3')" class="banner_text3 ng-pristine ng-untouched ng-valid ng-binding" style="color: rgb(255, 255, 255);">HE #1 CONVERSION EVENT FOR BUSINESS GROWTH</div>
After:
<div contenteditable="true" class="banner_text3 ng-pristine ng-untouched ng-valid ng-binding" style="color: rgb(255, 255, 255);">HE #1 CONVERSION EVENT FOR BUSINESS GROWTH</div>
Any suggestions?
You can specify angularJS attributes with the htmlAllowedAttrs option.
$('.selector').froalaEditor({
htmlAllowedAttrs: [
'title', 'href', 'alt', 'src', 'style',
'ng-style', 'ng-style', 'ng-bind-html', 'ng-mouseleave', 'ng-mouseover'
]
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With