wlxml: lists - allow for setting new list class
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 1 Apr 2014 20:21:26 +0000 (22:21 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 1 Apr 2014 20:21:26 +0000 (22:21 +0200)
src/wlxml/extensions/list/list.js

index d17e3e3..1404259 100644 (file)
@@ -37,7 +37,8 @@ extension.document.transformations.createList = {
             parentContents = parent.contents(),
             nodeIndexes = [params.node1.getIndex(), params.node2.getIndex()].sort(function(a,b) { return a-b; }),
             nodesToWrap = [],
-            listNode = params.node1.document.createDocumentNode({tagName: 'div', attrs: {'class': 'list'}}),
+            listClass = params.klass || 'list',
+            listNode = params.node1.document.createDocumentNode({tagName: 'div', attrs: {'class': listClass}}),
             listPlacePtr = params.node1,
             node, i;