Text Area multi editor not working properly!!!!

- Now you can add multiple editors in the same page working just fine,
all you need to do is to set data-target from "<div class="btn-toolbar
editor" data-role="editor-toolbar" data-target="editor-one">" the same
as the id " <div id="editor-one" class="editor-wrapper"></div>" (
editor-one ) here.
pull/343/head
Nicolae Gabriel 8 years ago
parent bc20fea065
commit b23019609a

@ -992,7 +992,7 @@
</div> </div>
<div class="x_content"> <div class="x_content">
<div id="alerts"></div> <div id="alerts"></div>
<div class="btn-toolbar editor" data-role="editor-toolbar" data-target="#editor"> <div class="btn-toolbar editor" data-role="editor-toolbar" data-target="editor-one">
<div class="btn-group"> <div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"><i class="fa fa-font"></i><b class="caret"></b></a> <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"><i class="fa fa-font"></i><b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
@ -1061,7 +1061,7 @@
</div> </div>
</div> </div>
<div id="editor" class="editor-wrapper"></div> <div id="editor-one" class="editor-wrapper"></div>
<textarea name="descr" id="descr" style="display:none;"></textarea> <textarea name="descr" id="descr" style="display:none;"></textarea>
@ -1431,9 +1431,14 @@
initToolbarBootstrapBindings(); initToolbarBootstrapBindings();
$('#editor').wysiwyg({ $('.editor-wrapper').each(function(){
fileUploadError: showErrorAlert var id = $(this).attr('id'); //editor-one
});
$(this).wysiwyg({
toolbarSelector: '[data-target="#' + id + '"]',
fileUploadError: showErrorAlert
});
});
window.prettyPrint; window.prettyPrint;
prettyPrint(); prettyPrint();

Loading…
Cancel
Save