Replace text field with rich text editor
-
Hi,
I im trying to replace the input type text to rich text editor in jquery-formbuilder.js
The code goes like this to create a quizz in Buddypress courseware plugin// adds a radio element var appendRadioGroup = function (values, options, required) { var title = ''; if (typeof (options) === 'object') { title = options[0]; } field += '<div class="rd_group">'; field += '<div class="frm-fld"><label>' + opts.messages.title + '</label>'; field += '<input type="text" name="title" value="' + title + '" /></div>'; field += '<div class="false-label">' + opts.messages.select_options + '</div>'; field += '<div class="fields">'; if (typeof (values) === 'object') { for (i = 0; i < values.length; i++) { field += radioFieldHtml(values[i], 'frm-' + last_id + '-fld'); } } else { field += radioFieldHtml('', 'frm-' + last_id + '-fld'); } field += '<div class="add-area"><a href="#" class="add add_rd">' + opts.messages.add + '</a></div>'; field += '</div>'; field += '</div>'; help = ''; appendFieldLi(opts.messages.radio_group, field, required, help); };
Now the sixth or seventh line defines the text field within the form for radio type quiz question
i.efield += '<input type="text" name="title" value="' + title + '" /></div>';
So, is there any function call or method to replace the<input type="text" >
to< ?php wp-editor?>
so the quizzes can add rich text area for questions and answers insead of plain single line text box. Any help would be highly appreciated.
Cheers
Satish
- The topic ‘Replace text field with rich text editor’ is closed to new replies.