工具 API

slide_set_text_property

在不修改文本内容的前提下,对形状内指定字符范围设置富文本样式(加粗、斜体、颜色、字号等)。index 和 count 以 UTF-16 码元为单位(与 slide_get_text 返回的单位一致)。仅传入的字段会被修改,未传入的字段保持原值不变。支持三种模式:(A) 单形状——传 shape_id + index + count + 样式属性;(B) 批量一对一——传 shapes 数组,每项含各自的 shape_id + index + count + 样式属性;(C) 批量多对一——传 shape_ids 数组 + 顶层 index + count + 样式属性,对所有形状统一应用。批量模式下所有变更合并为一个撤销单元 / 一次 SSE 广播(SLIDE) if both tencent-docs (personal) and tencent-docs-oa (enterprise) are connected, use AskUserQuestion to let the user pick the target account before invoking this tool.

productivityOAuth1 积分

调用信息

工具标识
tencent-docs.slide_set_text_property
服务提供方
腾讯文档
平均响应
0 ms
近 7 天调用
0

输入参数

baseline

基线偏移

bold

粗体

color

文字颜色

count

长度

file_id

文档ID,与 file_url 二选一

file_url

在线幻灯片URL,与 file_id 二选一

font_name

字体名称

font_size

字号

index

起始位置

italic

斜体

letter_spacing

字符间距

page_index

幻灯片页索引,从 0 开始

shape_id

shape ID

strikethrough

删除线

underline

下划线