fix 目录回退到旧版本onlyoffice代码
This commit is contained in:
@@ -528,7 +528,8 @@ export default {
|
|||||||
oParagraphTwo.SetBold(false)
|
oParagraphTwo.SetBold(false)
|
||||||
oDocument.InsertContent([oParagraphTwo])
|
oDocument.InsertContent([oParagraphTwo])
|
||||||
// 目录层级只留两级
|
// 目录层级只留两级
|
||||||
oDocument.AddTableOfContents({ 'BuildFrom': { 'OutlineLvls': 2 } })
|
// oDocument.AddTableOfContents({ 'BuildFrom': { 'OutlineLvls': 2 } })
|
||||||
|
Api.asc_AddTableOfContents()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
@@ -1791,6 +1792,8 @@ export default {
|
|||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
list[i].SetFontFamily('宋体')
|
list[i].SetFontFamily('宋体')
|
||||||
|
list[i].SetFontSize(21)
|
||||||
|
list[i].SetBold(false)
|
||||||
if (list[i].GetText().indexOf('前 言') !== -1 || list[i].GetText().indexOf('前言') !== -1) {
|
if (list[i].GetText().indexOf('前 言') !== -1 || list[i].GetText().indexOf('前言') !== -1) {
|
||||||
let text = list[i].GetText()
|
let text = list[i].GetText()
|
||||||
text = text.replace(/\s*/g, '')
|
text = text.replace(/\s*/g, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user