nbprint.config.content.ContentInlineLayout

pydantic model nbprint.config.content.ContentInlineLayout[source]

Bases: Content

field role: Role = Role.LAYOUT
field css: str = ':scope { display: block; }'
field esm: str = '\nfunction render(meta, elem) {\n    let data = JSON.parse(meta.data);\n\n    Array.from(elem.children).forEach((child) => {\n        // TODO:these are hacks to determine\n        // if it should be included\n        let output_children = (child.querySelector(".jp-OutputArea-output") || {}).children || [];\n        if (Array.from(child.classList).includes("nbprint")) {\n            child.style.display = "inline-block";\n            child.style.float = "left";\n        } else if (Array.from(output_children).length > 0) {\n            child.style.display = "inline-block";\n            child.style.float = "left";\n        }\n    });\n}\n'
field attrs: dict [Optional]