Kavya Shree Kavya Shree - 1 year ago
751 0

Hiiii Everyone,

I have a Rich text Editor(using nicEditor).I want to enclose each word with span .What I want is After adding some text in richtext Editor I wanna change it will The similarly for all words inside paragraph.I tried like above but Its return object.What is the issue? Please anyone help me.Thanks in advance.Im struggling for this issue longtime please anyone help me


Add Span for each Word in nicEditor Jquery

var myInstance1 = new nicEditor({
    iconsPath: 'https://cdn.jsdelivr.net/nicedit/0.9r24/nicEditorIcons.gif'
myInstance1.addEvent('blur', function() { 
var text1 = this.instanceById('differ_paragraph').getContent(); 
var nicInstance1 = nicEditors.findEditor('differ_paragraph');
 var words =  nicInstance1.getContent().split(" ");
nicEditors.findEditor("differ_paragraph").setContent(' ');
$.each(words, function(i, v) {

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download