Merge pull request #2 from bcipriano/fix-multi-data-options

Fix data-options lookup when multiple editors exist.
Этот коммит содержится в:
Mattia Roccoberton
2018-04-02 09:09:28 +02:00
коммит произвёл GitHub
родитель f3f2e500a1 940ba2e9ca
Коммит 0dfb48aec2

Просмотреть файл

@@ -20,7 +20,7 @@ window.onload = function() {
for( var i = 0; i < editors.length; i++ ) {
var content = editors[i].querySelector( '.quill-editor-content' );
if( content ) {
var options = editors[0].getAttribute( 'data-options' ) ? JSON.parse( editors[0].getAttribute( 'data-options' ) ) : default_options;
var options = editors[i].getAttribute( 'data-options' ) ? JSON.parse( editors[i].getAttribute( 'data-options' ) ) : default_options;
editors[i]['_quill-editor'] = new Quill( content, options );
}
}