[{"data":1,"prerenderedAt":502},["ShallowReactive",2],{"\u002Fdocs\u002Frichtext-override-format":3},{"id":4,"title":5,"body":6,"category":490,"date":491,"description":492,"extension":493,"heroImage":494,"meta":495,"navigation":496,"path":497,"readingMinutes":154,"seo":498,"stem":499,"tool":500,"__hash__":501},"docs\u002Fdocs\u002Frichtext-override-format.md","Rich text format for overrides",{"type":7,"value":8,"toc":481},"minimark",[9,23,28,42,46,49,158,182,188,191,300,319,323,336,340,346,455,459,477],[10,11,12,13,17,18,22],"p",{},"Most text elements are plain — a single string is all ",[14,15,16],"code",{},"textOverrides"," needs for them. But when a text element has ",[19,20,21],"strong",{},"mixed formatting inside it"," (part bold, a different color on one word, a linked phrase), it's in \"rich text\" mode, and its override value needs to be a small array of formatted runs instead of a plain string.",[24,25,27],"h2",{"id":26},"how-to-tell-which-mode-an-element-needs","How to tell which mode an element needs",[10,29,30,31,36,37,41],{},"You don't have to inspect the IDML for this — load the file into the ",[32,33,35],"a",{"href":34},"\u002Fidml","Convert tool"," or the ",[32,38,40],{"href":39},"\u002Fidml\u002Fapi","API playground"," and open the text-overrides table. Plain elements get a normal text box; rich-text elements get a small formatting toolbar on their input automatically. If you see the toolbar, that row needs the array shape below, not a string.",[24,43,45],{"id":44},"the-shape","The shape",[10,47,48],{},"A rich-text override value is an array of runs. Each run is a chunk of text plus the formatting that applies to just that chunk:",[50,51,56],"pre",{"className":52,"code":53,"language":54,"meta":55,"style":55},"language-json shiki shiki-themes github-dark","[\n  { \"text\": \"Save \", \"format\": {} },\n  { \"text\": \"30%\", \"format\": { \"fontWeight\": 700, \"color\": \"#e0392b\" } },\n  { \"text\": \" this week only.\", \"format\": {} }\n]\n","json","",[14,57,58,67,93,133,152],{"__ignoreMap":55},[59,60,63],"span",{"class":61,"line":62},"line",1,[59,64,66],{"class":65},"s95oV","[\n",[59,68,70,73,77,80,84,87,90],{"class":61,"line":69},2,[59,71,72],{"class":65},"  { ",[59,74,76],{"class":75},"sDLfK","\"text\"",[59,78,79],{"class":65},": ",[59,81,83],{"class":82},"sU2Wk","\"Save \"",[59,85,86],{"class":65},", ",[59,88,89],{"class":75},"\"format\"",[59,91,92],{"class":65},": {} },\n",[59,94,96,98,100,102,105,107,109,112,115,117,120,122,125,127,130],{"class":61,"line":95},3,[59,97,72],{"class":65},[59,99,76],{"class":75},[59,101,79],{"class":65},[59,103,104],{"class":82},"\"30%\"",[59,106,86],{"class":65},[59,108,89],{"class":75},[59,110,111],{"class":65},": { ",[59,113,114],{"class":75},"\"fontWeight\"",[59,116,79],{"class":65},[59,118,119],{"class":75},"700",[59,121,86],{"class":65},[59,123,124],{"class":75},"\"color\"",[59,126,79],{"class":65},[59,128,129],{"class":82},"\"#e0392b\"",[59,131,132],{"class":65}," } },\n",[59,134,136,138,140,142,145,147,149],{"class":61,"line":135},4,[59,137,72],{"class":65},[59,139,76],{"class":75},[59,141,79],{"class":65},[59,143,144],{"class":82},"\" this week only.\"",[59,146,86],{"class":65},[59,148,89],{"class":75},[59,150,151],{"class":65},": {} }\n",[59,153,155],{"class":61,"line":154},5,[59,156,157],{"class":65},"]\n",[10,159,160,161,164,165,168,169,172,173,177,178,181],{},"Concatenate every run's ",[14,162,163],{},"text"," in order and you get the plain-text content — ",[14,166,167],{},"\"Save 30% this week only.\""," here. The ",[14,170,171],{},"format"," object carries only what's ",[174,175,176],"em",{},"different"," from the element's own base style; an empty ",[14,179,180],{},"{}"," just means \"use whatever the element already looks like.\"",[24,183,185,187],{"id":184},"format-fields",[14,186,171],{}," fields",[10,189,190],{},"Every field is optional — omit one to inherit the element's base value rather than overriding it.",[192,193,194,210],"table",{},[195,196,197],"thead",{},[198,199,200,204,207],"tr",{},[201,202,203],"th",{},"Field",[201,205,206],{},"Type",[201,208,209],{},"Effect",[211,212,213,227,249,262,275,288],"tbody",{},[198,214,215,221,224],{},[216,217,218],"td",{},[14,219,220],{},"fontWeight",[216,222,223],{},"number (100–900)",[216,225,226],{},"Weight of just this run.",[198,228,229,234,246],{},[216,230,231],{},[14,232,233],{},"fontStyle",[216,235,236,239,240,239,243],{},[14,237,238],{},"'normal'"," | ",[14,241,242],{},"'italic'",[14,244,245],{},"'condensed'",[216,247,248],{},"Style of just this run.",[198,250,251,256,259],{},[216,252,253],{},[14,254,255],{},"fontSize",[216,257,258],{},"number (px)",[216,260,261],{},"Size of just this run.",[198,263,264,269,272],{},[216,265,266],{},[14,267,268],{},"letterSpacing",[216,270,271],{},"number",[216,273,274],{},"Tracking, as a ratio (InDesign-style), for just this run.",[198,276,277,282,285],{},[216,278,279],{},[14,280,281],{},"color",[216,283,284],{},"string",[216,286,287],{},"Any CSS color for just this run's text.",[198,289,290,295,297],{},[216,291,292],{},[14,293,294],{},"href",[216,296,284],{},[216,298,299],{},"Wraps this run in a link (carries through to PDF export).",[10,301,302,305,306,309,310,313,314,318],{},[14,303,304],{},"fontFamily"," and a horizontal ",[14,307,308],{},"scale"," also exist on the underlying type, but there's no need to set them per run: a font-family or scale difference always causes the conversion to split that content into a ",[19,311,312],{},"separate element"," rather than a mixed run within one element (see ",[32,315,317],{"href":316},"\u002Fdocs\u002Ftext-frames-and-best-practices","Text frames, bounds & best practices",") — so within a single rich-text array, every run already shares the same family and scale by construction.",[24,320,322],{"id":321},"line-breaks","Line breaks",[10,324,325,326,329,330,332,333,335],{},"A literal ",[14,327,328],{},"\\n"," inside a run's ",[14,331,163],{}," is a valid line break — you don't need a separate array entry per line, just embed ",[14,334,328],{}," wherever a break belongs within a run.",[24,337,339],{"id":338},"a-full-request-example","A full request example",[10,341,342,343,345],{},"Plain and rich-text keys sit side by side in the same ",[14,344,16],{}," object without any special marker — the shape of each value is all that distinguishes them:",[50,347,349],{"className":52,"code":348,"language":54,"meta":55,"style":55},"{\n  \"0:TextFrame_headline\": \"Willkommen in Berlin\",\n  \"0:TextFrame_promo\": [\n    { \"text\": \"Save \", \"format\": {} },\n    { \"text\": \"30%\", \"format\": { \"fontWeight\": 700, \"color\": \"#e0392b\" } },\n    { \"text\": \" this week only.\", \"format\": {} }\n  ]\n}\n",[14,350,351,356,369,377,394,426,443,449],{"__ignoreMap":55},[59,352,353],{"class":61,"line":62},[59,354,355],{"class":65},"{\n",[59,357,358,361,363,366],{"class":61,"line":69},[59,359,360],{"class":75},"  \"0:TextFrame_headline\"",[59,362,79],{"class":65},[59,364,365],{"class":82},"\"Willkommen in Berlin\"",[59,367,368],{"class":65},",\n",[59,370,371,374],{"class":61,"line":95},[59,372,373],{"class":75},"  \"0:TextFrame_promo\"",[59,375,376],{"class":65},": [\n",[59,378,379,382,384,386,388,390,392],{"class":61,"line":135},[59,380,381],{"class":65},"    { ",[59,383,76],{"class":75},[59,385,79],{"class":65},[59,387,83],{"class":82},[59,389,86],{"class":65},[59,391,89],{"class":75},[59,393,92],{"class":65},[59,395,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424],{"class":61,"line":154},[59,397,381],{"class":65},[59,399,76],{"class":75},[59,401,79],{"class":65},[59,403,104],{"class":82},[59,405,86],{"class":65},[59,407,89],{"class":75},[59,409,111],{"class":65},[59,411,114],{"class":75},[59,413,79],{"class":65},[59,415,119],{"class":75},[59,417,86],{"class":65},[59,419,124],{"class":75},[59,421,79],{"class":65},[59,423,129],{"class":82},[59,425,132],{"class":65},[59,427,429,431,433,435,437,439,441],{"class":61,"line":428},6,[59,430,381],{"class":65},[59,432,76],{"class":75},[59,434,79],{"class":65},[59,436,144],{"class":82},[59,438,86],{"class":65},[59,440,89],{"class":75},[59,442,151],{"class":65},[59,444,446],{"class":61,"line":445},7,[59,447,448],{"class":65},"  ]\n",[59,450,452],{"class":61,"line":451},8,[59,453,454],{"class":65},"}\n",[24,456,458],{"id":457},"next-steps","Next steps",[460,461,462,468],"ul",{},[463,464,465,467],"li",{},[32,466,317],{"href":316}," — why an element ends up plain vs. rich text in the first place.",[463,469,470,473,474,476],{},[32,471,472],{"href":39},"Full API reference"," for ",[14,475,16],{}," and every other render option.",[478,479,480],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":55,"searchDepth":69,"depth":69,"links":482},[483,484,485,487,488,489],{"id":26,"depth":69,"text":27},{"id":44,"depth":69,"text":45},{"id":184,"depth":69,"text":486},"format fields",{"id":321,"depth":69,"text":322},{"id":338,"depth":69,"text":339},{"id":457,"depth":69,"text":458},"reference","2026-07-16","The exact JSON shape textOverrides expects when a text element has mixed formatting inside it — fields, defaults, line breaks, and a full worked example.","md","\u002Fdocs-images\u002Frichtext-override-format.svg",{},true,"\u002Fdocs\u002Frichtext-override-format",{"title":5,"description":492},"docs\u002Frichtext-override-format","indesign","1Lq8iHTebQY8tSMd_g4AGRMqO2VOjO6qLQl38kQjslk",1784233655665]