Properties

JavaScript properties on the <jinn-tap> element.

const editor = document.querySelector('jinn-tap');

content

editor.content = '<tei-div><tei-p>New content</tei-p></tei-div>';

Setting content also synthesizes schema entries for any unknown elements in the fragment.

xml

editor.xml = '<TEI xmlns="http://www.tei-c.org/ns/1.0">…</TEI>';
const current = editor.xml;

format

The active format ('tei' or 'jats'). Set at initialization via the format attribute.

console.log(editor.format); // 'tei'

stylesheet

Resolved URL of the stylesheet from the active schema's css property, or null if none is declared. The component injects this as a <link> unless no-schema-css is set.

console.log(editor.stylesheet);
// e.g. 'http://localhost:5174/src/tei-editor-styles.css'

tiptap

The underlying Tiptap Editor instance, for direct access to commands and state.

editor.tiptap.commands.setContent('<tei-div><tei-p>Hi</tei-p></tei-div>');
editor.tiptap.chain().focus().toggleMark('hi', { rend: 'b' }).run();

See the JavaScript API for common command patterns.