typograph-editor-documentation
    Preparing search index...

    Release Notes - Version 1.0.0-20260817

    • Find and Replace ( menu Edit -> Find and Replace…, ⌘F ). Searches every page of the document. A phrase is found even when its formatting changes part way through, so "Dear NAME" is matched with the name in bold. Linked text frames are searched once as the single flow they are, rather than once per frame. Replace All is one undo step however many frames or pages it touched. Match case and Whole word are both optional. The Replace field takes more than one line: a replacement carrying a line break splits the paragraph, exactly as pressing Enter in the frame would. Editor only — the viewer does not offer it.
    • Text inside table cells is not searched or replaced. The dialog says so where it reports its count, because a "12 replaced" that quietly left three matches in a table would be worse than no feature at all.
    • Fixed: a placed image lost its link to the manifest when the document was saved. After one save-and-reopen the frame came back blank in the editor, and the publisher skipped it, so the image was missing from the PDF as well. A document that arrives already damaged now repairs itself on open, by matching the manifest against the element name.
    • Fixed: an imported template came back in Source Sans Pro, whatever fonts it actually used. Every rich text element was arriving stamped with the fallback font, which then won over the real family. It also spread: the wrong font was written into the shared paragraph style on save, and from then on that style overruled the individual runs. Newly imported templates keep their fonts. ⚠️ Templates already saved by the affected build cannot be repaired by this release — the family is gone from the file. They need to be imported again.
    • Fixed: importing a template could multiply its font list. A four-font manifest reached twelve font entries, and the bloated list was written back into the document, so it grew again on every round trip. That same import now loads five entries: the default plus the four real families.
    • Fixed: window.typograph.set_interactive(false) had no effect in the new viewer when the host supplies its own mouse manager. View-only embeds built on the new bundle stayed fully interactive; they now honour the call, and interactive:false in the setup object, as before.
    • Fixed: in the viewer, double-clicking a text frame or an image did nothing — the element could be selected, and the selection event fired, but edit mode never started. The elements carried an edit_options block that forbade everything, and the viewer obeyed it. Nothing can author those options yet, so a block in a file today was not written by anyone deciding what a user may do: it came from a converter, or from an older build that stamped a preset onto every element when a document was opened and then wrote it out on save. Until the editor offers a way to author them, the library ignores whatever a document carries and applies its own defaults — which in the viewer allow selecting, editing text, and moving, scaling and rotating an image inside its frame. Opening and saving an affected template also clears the block out of the file.
    • Fixed: on a page that supplies its own markup rather than letting the library build the editor chrome, double-clicking a text frame silently failed to start editing. The library was writing to the zoom readout without checking it exists, and threw at exactly that point. The same check was missing in set_zoom(), which a host can call at any time.
    • Fixed: the stylesheet styled the page it was embedded in. Four of its rules matched elements the host owns, because they were written when the editor was the whole page rather than something mounted inside one. A page embedding the viewer lost its scrolling and its text selection, had its margins, base font and background replaced, saw its <hr> and file inputs restyled, and had every element on it reset to content-box — overriding a border-box layout. All four are now confined to the editor's own subtree. Reported by an integrator embedding the viewer.
      • The editor and the viewer now mark their own markup with the class typograph, and the stylesheet is scoped to it. It is also the selector to use if you want to restyle the interface from your page: .typograph .toolbar { … }.
      • Page-level styling — margins, overflow: hidden, background — is applied to <body> only when Typograph is the page, through the class typograph-page, and removed on destroy(). A full-page editor is unchanged; a page that only embeds one keeps its own.
      • Pages carrying the old hand-authored markup are unchanged: they are the full-page layout by definition and are marked as such automatically.
    • New documentation page: Find and replace from host code. The API below in full, with the linked frame and table cell behaviour spelled out.
    • New host API for find and replace, available in the editor and the viewer regardless of whether the dialog is offered:
      • window.typograph.find(needle, options) returns every occurrence as { element_uuid, page_index, paragraph_index, char_offset, length }.
      • window.typograph.replace_all(needle, replacement, options) returns how many it replaced, as one undo step.
      • options takes case_sensitive, whole_word, and page_index or element_uuid to narrow the search.
      • A match names the flow's first frame, which is the element that owns the text; a replacement containing \n splits the paragraph. Table cells are excluded, so a count of 0 does not prove the document is free of the needle.
    • New documentation page: The text model, for backend code. Written for server-side code that fills placeholders in a template without running the Typograph library — a Rails backend preparing a document for the editor or the viewer. It covers where the text lives in the JSON, the three rules that are easy to get wrong, and worked examples, including replacing a placeholder that sits inside a sentence with several paragraphs. The stored layout it warns about is the one the PDF generator reads, which is why getting this wrong produces a wrong PDF rather than an error.