Created
August 29, 2022 13:48
-
-
Save xuruiyao-msft/56b3eb1979dde1e78ab18bc460b5ca52 to your computer and use it in GitHub Desktop.
Create a new snippet from a blank template.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: FootEndNote (1) | |
description: Create a new snippet from a blank template. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
OfficeExtension.config.extendedErrorLogging = true; | |
$("#run").click(() => tryCatch(run)); | |
$("#getFirst").click(() => tryCatch(getFirst)); | |
$("#items").click(() => tryCatch(items)); | |
$("#getFirstOrNull").click(() => tryCatch(getFirstOrNull)); | |
$("#next").click(() => tryCatch(next)); | |
$("#body").click(() => tryCatch(body)); | |
$("#footNoteBody").click(() => tryCatch(footNoteBody)); | |
$("#insertText2").click(() => tryCatch(insertText2)); | |
$("#search").click(() => tryCatch(search)); | |
$("#replaceSpace").click(() => tryCatch(replaceSpace)); | |
var trackVar; | |
$("#track").click(() => tryCatch(track)); | |
$("#print").click(() => tryCatch(print)); | |
$("#insert").click(() => tryCatch(insert)); | |
$("#type").click(() => tryCatch(typ)); | |
$("#ref").click(() => tryCatch(ref)); | |
$("#iterate").click(() => tryCatch(iterate)); | |
$("#range").click(() => tryCatch(range)); | |
$("#ContentControl").click(() => tryCatch(cc)); | |
$("#getParent").click(() => tryCatch(getParent)); | |
$("#getParentSection").click(() => tryCatch(getParentSec)); | |
$("#getHtml").click(() => tryCatch(getHtml)); | |
$("#getOoxml").click(() => tryCatch(getOoxml)); | |
$("#clear").click(() => tryCatch(clear)); | |
$("#searchBody").click(() => tryCatch(searchBody)); | |
$("#insertBreak").click(() => tryCatch(insertBreak)); | |
$("#insertCommentsInRange").click(() => tryCatch(insertCommentsInRange)); | |
$("#addNote").click(() => tryCatch(addNote)); | |
$("#bodyTypeTest").click(() => tryCatch(bodyTypeTest)); | |
$("#getNext").click(() => tryCatch(getNext)); | |
async function getNext() { | |
await Word.run(async (context) => { | |
let fs = context.document.body.footnotes; | |
fs.load(); | |
await context.sync(); | |
let f = fs.getFirstOrNullObject(); | |
f.load(); | |
await context.sync(); | |
let nex1 = f.getNextOrNullObject(); | |
nex1.load(); | |
let nex1Body = nex1.body; | |
nex1Body.load(); | |
await context.sync(); | |
let nex2 = nex1.getNextOrNullObject(); | |
nex2.load(); | |
let nex2Body = nex2.body; | |
nex2Body.load(); | |
await context.sync(); | |
console.log("nex1:" + nex1Body.text); | |
console.log("nex2:" + nex2Body.text); | |
}); | |
} | |
async function bodyTypeTest() { | |
await Word.run(async (context) => { | |
let body = context.document.body; | |
body.load(); | |
await context.sync(); | |
// let mainParentBody = body.parentBody; | |
// await context.sync(); | |
console.log("body.type:" + body.type); | |
// console.log("parentbody:" + mainParentBody); | |
let sel = context.document.getSelection(); | |
sel.load(); | |
await context.sync(); | |
let parentBody = sel.parentBody; | |
parentBody.load(); | |
await context.sync(); | |
console.log("body.type:" + parentBody.type); | |
}); | |
} | |
async function addNote() { | |
await Word.run(async (context) => { | |
// let b = context.document.body; | |
// b.load(); | |
// let f = b.footnotes.getFirst(); | |
// f.load(); | |
// let fb = f.body; | |
// fb.load(); | |
// let r = fb.getRange(); | |
// r.load(); | |
// await context.sync(); | |
// r.insertFootnote("newly added"); | |
// await context.sync(); | |
let r = context.document.getSelection(); | |
r.load(); | |
await context.sync(); | |
r.insertFootnote("newly added note"); | |
await context.sync(); | |
}); | |
} | |
async function insertCommentsInRange() { | |
await Word.run(async (context) => { | |
let b = context.document.getEndnoteBody(); | |
b.load(); | |
let r = b.getRange(); | |
r.load(); | |
r.insertComment("commentInFootnote"); | |
await context.sync(); | |
}); | |
} | |
async function insertBreak() { | |
await Word.run(async (context) => { | |
let b = context.document.getEndnoteBody(); | |
b.load(); | |
b.insertBreak("Line", "Start"); | |
await context.sync(); | |
}); | |
} | |
async function searchBody() { | |
await Word.run(async (context) => { | |
let footNoteBody = context.document.getFootnoteBody(); | |
footNoteBody.load(); | |
await context.sync(); | |
let res = footNoteBody.search("Video"); | |
res.load(); | |
await context.sync(); | |
console.log("res.items.size:" + res.items.length); | |
}); | |
} | |
async function clear() { | |
await Word.run(async (context) => { | |
let footNoteBody = context.document.getFootnoteBody(); | |
footNoteBody.load(); | |
// let range = footNoteBody.getRange(); | |
let range = context.document.getSelection(); | |
range.load(); | |
await context.sync(); | |
// footNoteBody.clear(); | |
// range.clear(); | |
range.delete(); | |
await context.sync(); | |
// let body = context.document.body; | |
// body.load(); | |
// await context.sync(); | |
// let f = body.footnotes.getFirst(); | |
// f.load(); | |
// let fBody = f.body; | |
// fBody.load(); | |
// await context.sync(); | |
// fBody.clear(); | |
// await context.sync(); | |
}); | |
} | |
async function getOoxml() { | |
await Word.run(async (context) => { | |
let footNoteBody = context.document.getFootnoteBody(); | |
footNoteBody.load(); | |
await context.sync(); | |
// let body = context.document.body; | |
// body.load(); | |
// await context.sync(); | |
// let f = body.footnotes.getFirst(); | |
// f.load(); | |
// let fBody = f.body; | |
// fBody.load(); | |
// await context.sync(); | |
let o = footNoteBody.getOoxml(); | |
await context.sync(); | |
console.log("Ooxml:" + o.value); | |
}); | |
} | |
async function getHtml() { | |
await Word.run(async (context) => { | |
let footNoteBody = context.document.getFootnoteBody(); | |
footNoteBody.load(); | |
await context.sync(); | |
// let body = context.document.body; | |
// body.load(); | |
// await context.sync(); | |
// let f = body.footnotes.getFirst(); | |
// f.load(); | |
// let fBody = f.body; | |
// fBody.load(); | |
// await context.sync(); | |
let h = footNoteBody.getHtml(); | |
await context.sync(); | |
console.log("getHtml:" + h.value); | |
footNoteBody.insertHtml(h.value, "Start"); | |
await context.sync(); | |
}); | |
} | |
async function getParentSec() { | |
await Word.run(async (context) => { | |
// let footNoteBody = context.document.getFootnoteBody(); | |
// footNoteBody.load(); | |
// await context.sync(); | |
let body = context.document.body; | |
body.load(); | |
await context.sync(); | |
let f = body.footnotes.getFirst(); | |
f.load(); | |
let fBody = f.body; | |
fBody.load(); | |
await context.sync(); | |
let parentSection = fBody.parentSection; | |
parentSection.load(); | |
await context.sync(); | |
console.log("parent section:" + parentSection); | |
}); | |
} | |
async function getParent1() { | |
await Word.run(async (context) => { | |
let fBody = context.document.getFootnoteBody(); | |
fBody.load(); | |
await context.sync(); | |
let parentBody = fBody.parentBody; | |
parentBody.load(); | |
await context.sync(); | |
console.log("fBody:" + parentBody.text); | |
}); | |
} | |
async function getParent() { | |
await Word.run(async (context) => { | |
let sel = context.document.getSelection(); | |
sel.load(); | |
await context.sync(); | |
let parentBody = sel.parentBody; | |
parentBody.load(); | |
await context.sync(); | |
console.log("fBody:" + parentBody.text); | |
}); | |
} | |
async function cc() { | |
await Word.run(async (context) => { | |
let range = context.document.getSelection(); | |
range.load(); | |
await context.sync(); | |
console.log("range.text:" + range.text); | |
let ccc = range.contentControls.getFirst(); | |
ccc.load(); | |
await context.sync(); | |
console.log("ccc:" + ccc); | |
// let fs = ccc.footnotes; | |
// fs.load(); | |
// await context.sync(); | |
// let f = fs.getFirst(); | |
// f.load(); | |
// let b = f.body; | |
// b.load(); | |
// await context.sync(); | |
// console.log("f:" + b.text); | |
let parentBody = ccc.parentBody; | |
parentBody.load(); | |
await context.sync(); | |
console.log("content control in footnotepane's parent body:" + parentBody.text); | |
}); | |
} | |
async function range() { | |
await Word.run(async (context) => { | |
// // const sel = context.document.getSelection(); | |
// // sel.load(); | |
// // await context.sync(); | |
// // const fs = sel.footnotes; | |
// // fs.load(); | |
// // await context.sync(); | |
// // console.log("fs.size:" + fs.items.length); | |
// const pa = context.document.body.paragraphs.getFirst().getRange("Whole").select(); | |
// await context.sync(); | |
// const body = context.document.getFootnoteBody(); | |
// body.load(); | |
// const range = body.getRange("End"); | |
// range.select(); | |
// await context.sync(); | |
const body = context.document.getFootnoteBody(); | |
body.load(); | |
const firstFoot = body.footnotes.getFirst(); | |
const fBody = firstFoot.body; | |
fBody.getRange("End").select(); | |
await context.sync(); | |
}); | |
} | |
async function iterate() { | |
await Word.run(async (context) => { | |
const fs = context.document.getSelection().footnotes; | |
fs.load(); | |
await context.sync(); | |
const ff = fs.getFirst(); | |
const fr = ff.body; | |
fr.load(); | |
await context.sync(); | |
console.log("fr text:" + fr.text); | |
const sf = ff.getNext(); | |
const sr = sf.body; | |
sr.load(); | |
await context.sync(); | |
console.log("sr text:" + sr.text); | |
}); | |
} | |
async function ref() { | |
await Word.run(async (context) => { | |
const es = context.document.body.footnotes; | |
es.load(); | |
await context.sync(); | |
const fe = es.getFirst(); | |
const ref = fe.reference; | |
ref.load(); | |
await context.sync(); | |
console.log("ref text:" + ref.text); | |
const body = fe.body; | |
body.load(); | |
await context.sync(); | |
console.log("body:" + body.text); | |
}); | |
} | |
async function typ() { | |
await Word.run(async (context) => { | |
let f = context.document.body.footnotes.getFirst(); | |
f.load(); | |
let fBody = f.body; | |
fBody.load(); | |
await context.sync(); | |
console.log("footnote.body.type:" + fBody.type); | |
let footnoteBody = context.document.getFootnoteBody(); | |
footnoteBody.load(); | |
await context.sync(); | |
console.log("footnoteBody type:" + footnoteBody.type); | |
}); | |
} | |
async function insert() { | |
await Word.run(async (context) => { | |
let f = context.document.getFootnoteBody(); | |
f.load(); | |
await context.sync(); | |
let fs = f.footnotes; | |
fs.load(); | |
await context.sync(); | |
let foot = fs.items[0]; | |
foot.load(); | |
// let footBody = foot.body; | |
// footBody.load(); | |
await context.sync(); | |
let footBody = context.document.getSelection(); | |
footBody.insertText("End", "End"); | |
await context.sync(); | |
// let footnoteBody = context.document.getFootnoteBody(); | |
// footnoteBody.load(); | |
// await context.sync(); | |
// footnoteBody.clear(); | |
// await context.sync(); | |
}); | |
} | |
async function track() { | |
await Word.run(async (context) => { | |
const fs = context.document.body.footnotes; | |
fs.load(); | |
await context.sync(); | |
trackVar = fs.getFirst(); | |
trackVar.track(); | |
trackVar.load(); | |
await context.sync(); | |
let body = trackVar.body; | |
body.load(); | |
await context.sync(); | |
console.log("trackVar:" + body.text); | |
}); | |
} | |
async function print() { | |
await Word.run(trackVar, async (context) => { | |
trackVar.load(); | |
await context.sync(); | |
console.log("trackVar:" + trackVar.text); | |
}); | |
} | |
async function footNoteBody() { | |
await Word.run(async (context) => { | |
// let fnBody = context.document.getFootnoteBody(); | |
let fnBody = context.document.body; | |
fnBody.load(); | |
await context.sync(); | |
// console.log("footnote body:" + fnBody.text); | |
let f = fnBody.endnotes.getFirst(); | |
f.load(); | |
let body = f.body; | |
body.load(); | |
await context.sync(); | |
console.log("endnote text:" + body.text); | |
}); | |
} | |
//Document.search, Document.search2 not implement | |
async function search() { | |
await Word.run(async (context) => { | |
let doc = context.document; | |
doc.load(); | |
await context.sync(); | |
let rc = doc.search("Video"); | |
rc.load(); | |
await context.sync(); | |
console.log("size:" + rc.items.length); | |
}); | |
} | |
async function replaceSpace() { | |
await Word.run(async (context) => { | |
var paragraph = context.document.body.paragraphs.getFirst(); | |
paragraph.load(); | |
await context.sync(); | |
let rangeCollection = paragraph.search(" {2,}"); | |
rangeCollection.load(); | |
await context.sync(); | |
console.log("range.length:" + rangeCollection.items.length); | |
for (let i = 0; i < rangeCollection.items.length; i++) { | |
var range = rangeCollection.items[i]; | |
range.insertText(" ", "Replace"); | |
} | |
await context.sync(); | |
}); | |
} | |
async function insertText2() { | |
await Word.run(async (context) => { | |
// Replace the last paragraph. | |
var paragraph = context.document.body.paragraphs.getFirst(); | |
paragraph.load(); | |
await context.sync(); | |
var regexMoreSpaces = "Video"; | |
var newText = paragraph.text.replace(regexMoreSpaces, ""); | |
const range = paragraph.insertText(newText, "Replace"); | |
await context.sync(); | |
}); | |
} | |
async function body() { | |
await Word.run(async (context) => { | |
const body = context.document.body; | |
const footnotes = body.footnotes; | |
footnotes.load(); | |
await context.sync(); | |
console.log("footnotes size:" + footnotes.items.length); | |
let first = footnotes.getFirstOrNullObject(); | |
first.load(); | |
let fBody = first.body; | |
fBody.load(); | |
await context.sync(); | |
console.log("firstbody:" + fBody.text); | |
//paragraphs | |
let paragraphs = fBody.paragraphs; | |
paragraphs.load(); | |
await context.sync(); | |
let fp = paragraphs.items[0]; | |
fp.load(); | |
await context.sync(); | |
console.log("first paragraph:" + fp.text); | |
//get content control | |
let ccs = fBody.contentControls; | |
ccs.load(); | |
await context.sync(); | |
let cc = ccs.items[0]; | |
cc.load(); | |
await context.sync(); | |
console.log("cc.text:" + cc.text); | |
//get parent content control | |
// let pcc = fBody.parentContentControl; | |
// pcc.select(); | |
// await context.sync(); | |
//font | |
let font = fBody.font; | |
font.load(); | |
await context.sync(); | |
console.log("font.bold:" + font.bold); | |
// let footnotes = fBody.footnotes; | |
// footnotes.load(); | |
// await context.sync(); | |
// console.log("footnotes items:" + footnotes.items.length); | |
//get endnotes from footnote body | |
// let endnotesFromFBody = fBody.endnotes; | |
// endnotesFromFBody.load(); | |
// await context.sync(); | |
// console.log("endnotesFromFBody:" + endnotesFromFBody.items.length); | |
//get field | |
// get inline picture | |
let pictures = fBody.inlinePictures; | |
pictures.load(); | |
await context.sync(); | |
let fpic = pictures.items[0]; | |
fpic.load(); | |
await context.sync(); | |
console.log("fpic:" + fpic.width); | |
//get list | |
const bodyr = context.document.body; | |
bodyr.load(); | |
await context.sync(); | |
let lists = bodyr.lists; | |
lists.load(); | |
await context.sync(); | |
let list = lists.items[0]; | |
list.load(); | |
await context.sync(); | |
let levelstr = list.getLevelString(2); | |
await context.sync(); | |
console.log("list:" + levelstr.value); | |
//get table | |
// let tables = fBody.tables; | |
// tables.load(); | |
// await context.sync(); | |
// let ft = tables.items[0]; | |
// ft.load(); | |
// await context.sync(); | |
// console.log("table:" + ft.rows); | |
// let frow = ft.rows.getFirst(); | |
// frow.load(); | |
// await context.sync(); | |
// console.log("frow:" + frow.rowIndex); | |
//insertText!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!before&after throw exception | |
// let firstText = fBody.insertText("start","Start"); | |
// firstText.load(); | |
// await context.sync(); | |
// console.log("firstText:"+ firstText.text); | |
// let beforeText = fBody.insertText("Before", "Before"); | |
// beforeText.load(); | |
// await context.sync(); | |
// console.log("beforeText:"+ beforeText.text); | |
// let afterText = fBody.insertText("After", "After"); | |
// afterText.load(); | |
// await context.sync(); | |
// console.log("afterText:"+ afterText.text); | |
// let endText = fBody.insertText("End", "End"); | |
// endText.load(); | |
// await context.sync(); | |
// console.log("EndText:"+ endText.text); | |
}); | |
} | |
var n; | |
async function next() { | |
await Word.run(trackVar, async (context) => { | |
// const body = context.document.body; | |
// const endnotes = body.endnotes; | |
// endnotes.load(); | |
// await context.sync(); | |
// let first = endnotes.getFirstOrNullObject(); | |
// first.load(); | |
// await context.sync(); | |
// console.log("first type:" + first.type); | |
// let next = first.getNext(); | |
// next.load(); | |
// let nextbody = next.body; | |
// nextbody.load(); | |
// await context.sync(); | |
// console.log("next text:" + nextbody.text); | |
trackVar = trackVar.getNext(); | |
trackVar.track(); | |
trackVar.load(); | |
await context.sync(); | |
let body = trackVar.body; | |
body.load(); | |
await context.sync(); | |
body.select(); | |
}); | |
} | |
async function getFirstOrNull() { | |
await Word.run(async (context) => { | |
const body = context.document.body; | |
const endnotes = body.endnotes; | |
endnotes.load(); | |
await context.sync(); | |
let first = endnotes.getFirstOrNullObject(); | |
first.load(); | |
await context.sync(); | |
console.log("first endnote:" + first); | |
let firstbody = first.body; | |
firstbody.load(); | |
await context.sync(); | |
console.log("first endnote text:" + firstbody.text); | |
}); | |
} | |
async function items() { | |
await Word.run(async (context) => { | |
const body = context.document.getSelection(); | |
body.load(); | |
await context.sync(); | |
console.log("sel.text:" + body.text); | |
const endnotes = body.footnotes; | |
endnotes.load(); | |
await context.sync(); | |
console.log("endnotes.items.leng:" + endnotes.items.length); | |
const endnote1 = endnotes.items[0]; | |
endnote1.load(); | |
await context.sync(); | |
console.log("endnote1:" + endnote1.type); | |
endnote1.delete(); | |
await context.sync(); | |
}); | |
} | |
async function run() { | |
await Word.run(async (context) => { | |
// const body = context.document.getFootnoteBody(); | |
// body.load(); | |
// await context.sync(); | |
const range = context.document.getSelection(); | |
let footnote = range.insertFootnote("222"); | |
// let endnote = range.insertEndnote("e"); | |
footnote.load(); | |
// endnote.load(); | |
await context.sync(); | |
// console.log("type: "+ footnote.type); | |
// console.log("type: " + endnote.type); | |
// let endnoteRange = endnote.body.getRange(); | |
// endnoteRange.load(); | |
// await context.sync(); | |
// console.log("body.range.text: " + endnoteRange.text); | |
// let body = endnote.body; | |
// body.load(); | |
// await context.sync(); | |
// body.insertContentControl(); | |
// await context.sync(); | |
// console.log("body text: " + body.text); | |
// console.log("body type: " + body.type); | |
// // const body = context.document.body; | |
// // body.load(); | |
// // await context.sync(); | |
// const footnotes = body.footnotes; | |
// footnotes.load("item"); | |
// await context.sync(); | |
// console.log("footnotes length: " + footnotes.items.length); | |
// const footnote = footnotes.items[0]; | |
// footnote.load(); | |
// const ref = footnote.reference; | |
// ref.load(); | |
// await context.sync(); | |
// ref.select(); | |
// console.log("footnote reference text: " + ref.text); | |
// const fn = footnotes.items[0]; | |
// fn.load("type"); | |
// await context.sync(); | |
// console.log("footnote type: "+ fn.type); | |
// const comments = context.document.body.getComments(); | |
// comments.load(); | |
// await context.sync(); | |
// console.log("comments length: " + comments.items.length); | |
// const comment = comments.items[0]; | |
// comment.load(); | |
// await context.sync(); | |
// console.log("comment type: " + comment.creationDate); | |
// const sections = context.document.sections; | |
// sections.load(); | |
// await context.sync(); | |
// console.log("section 1: "+ sections.items[0]); | |
// console.log("section 2: "+ sections.items[1]); | |
}); | |
} | |
async function getFirst() { | |
await Word.run(async (context) => { | |
const body = context.document.body; | |
body.load(); | |
await context.sync(); | |
let endnotes = body.endnotes; | |
endnotes.load(); | |
await context.sync(); | |
let endnote = endnotes.getFirst(); | |
endnote.load(); | |
let endnoteBody = endnote.body; | |
endnoteBody.load(); | |
await context.sync(); | |
console.log("endnoteBody.text:" + endnoteBody.text); | |
}); | |
} | |
/** Default helper for invoking an action and handling errors. */ | |
async function tryCatch(callback) { | |
try { | |
await callback(); | |
} catch (error) { | |
// Note: In a production add-in, you'd want to notify the user through your add-in's UI. | |
console.error(error); | |
} | |
} | |
language: typescript | |
template: | |
content: | | |
<button id="run" class="ms-Button"> | |
<span class="ms-Button-label">Run</span> | |
</button> | |
<button id="items" class="ms-Button"> | |
<span class="ms-Button-label">items</span> | |
</button> | |
<button id="getFirst" class="ms-Button"> | |
<span class="ms-Button-label">getFirst</span> | |
</button> | |
<button id="getFirstOrNull" class="ms-Button"> | |
<span class="ms-Button-label">getFirstOrNull</span> | |
</button> | |
<button id="next" class="ms-Button"> | |
<span class="ms-Button-label">next</span> | |
</button> | |
<button id="nextOrNull" class="ms-Button"> | |
<span class="ms-Button-label">nextOrNull</span> | |
</button> | |
<button id="body" class="ms-Button"> | |
<span class="ms-Button-label">body</span> | |
</button> | |
<button id="footNoteBody" class="ms-Button"> | |
<span class="ms-Button-label">footNoteBody</span> | |
</button> | |
<button id="insertText2" class="ms-Button"> | |
<span class="ms-Button-label">insertText2</span> | |
</button> | |
<button id="replaceSpace" class="ms-Button"> | |
<span class="ms-Button-label">replaceSpace</span> | |
</button> | |
<button id="search" class="ms-Button"> | |
<span class="ms-Button-label">search</span> | |
</button> | |
<button id="track" class="ms-Button"> | |
<span class="ms-Button-label">track</span> | |
</button> | |
<button id="print" class="ms-Button"> | |
<span class="ms-Button-label">print</span> | |
</button> | |
<button id="insert" class="ms-Button"> | |
<span class="ms-Button-label">insert</span> | |
</button> | |
<button id="type" class="ms-Button"> | |
<span class="ms-Button-label">type</span> | |
</button> | |
<button id="ref" class="ms-Button"> | |
<span class="ms-Button-label">ref</span> | |
</button> | |
<button id="iterate" class="ms-Button"> | |
<span class="ms-Button-label">iterate</span> | |
</button> | |
<button id="range" class="ms-Button"> | |
<span class="ms-Button-label">range</span> | |
</button> | |
<button id="ContentControl" class="ms-Button"> | |
<span class="ms-Button-label">ContentControl</span> | |
</button> | |
<button id="getParent" class="ms-Button"> | |
<span class="ms-Button-label">getParent</span> | |
</button> | |
<button id="getParentSection" class="ms-Button"> | |
<span class="ms-Button-label">getParentSection</span> | |
</button> | |
<button id="getHtml" class="ms-Button"> | |
<span class="ms-Button-label">getHtml</span> | |
</button> | |
<button id="getOoxml" class="ms-Button"> | |
<span class="ms-Button-label">getOoxml</span> | |
</button> | |
<button id="clear" class="ms-Button"> | |
<span class="ms-Button-label">clear</span> | |
</button> | |
<button id="searchBody" class="ms-Button"> | |
<span class="ms-Button-label">searchBody</span> | |
</button> | |
<button id="insertBreak" class="ms-Button"> | |
<span class="ms-Button-label">insertBreak</span> | |
</button> | |
<button id="insertCommentsInRange" class="ms-Button"> | |
<span class="ms-Button-label">insertCommentsInRange</span> | |
</button> | |
<button id="addNote" class="ms-Button"> | |
<span class="ms-Button-label">addNote</span> | |
</button> | |
<button id="bodyTypeTest" class="ms-Button"> | |
<span class="ms-Button-label">BodyTypeTest</span> | |
</button> | |
<button id="getNext" class="ms-Button"> | |
<span class="ms-Button-label">getNext</span> | |
</button> | |
language: html | |
style: | |
content: |- | |
section.samples { | |
margin-top: 20px; | |
} | |
section.samples .ms-Button, section.setup .ms-Button { | |
display: block; | |
margin-bottom: 5px; | |
margin-left: 20px; | |
min-width: 80px; | |
} | |
language: css | |
libraries: | | |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js | |
@types/office-js | |
office-ui-fabric-js@1.4.0/dist/css/fabric.min.css | |
office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css | |
core-js@2.4.1/client/core.min.js | |
@types/core-js | |
jquery@3.1.1 | |
@types/jquery@3.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment