1. Item 1
2. Item 2
3. Item 3
1. item 7
2. Item 8
a. Item a
b. Item b
i. Item i
ii. Item ii
1. Item I
2. Item ii
3. Item 9
4. Item 10
When I run it in the native json I get :
I am trying to parse this with LUA with the function:
function OrderedList(items)
local newItems = {}
local listItems = ''
local itemCtr = 1
beginTag = '<CONTAINER bb:type="LIST" bb:listType="NORMAL" bb:listLevel="0">'
endTag = '</CONTAINER>'
for _, item in pairs(items) do
if nil ~= item and string.len(item) > 0 then
item = removeTags(item)
-- listItems = listItems .. '<BLOCK bb:type="LIST_ITEM" bb:itemLevel="0">'.. itemCtr .. '. ' .. item .. '</BLOCK>'
print ('fuck' .. itemCtr .. '. ' .. item)
table.insert(newItems,'<BLOCK bb:type="LIST_ITEM" bb:itemLevel="0">'.. itemCtr .. '. ' .. item .. '</BLOCK>')
itemCtr = itemCtr + 1
end
end
newItems.bullet = true
return BulletList(newItems)
end
I know I can adjust the above LUA if I cna just figure out how to get the start value, and the style out of the native into the LUA. Can someone tell me the line of code I need to ge the attributes. I have tried things like:
items.attributes
items.listAttributes
I even checked the item before I output the json and saw that tthe attributes are on the main list. I can't seem to get the LUA function to see the things like starting value and I don't know what I have to do so that I can parse the levels correctly. All help is welcome. Heck if someone has something that can take the above docx list and output it as a text list that is all I need. I can wrap that in our tags. I have been looking for any examples of LUA filters that make multi level broken lists into anything and I can not find an example.
Thanks for any help.