pub struct DjotImportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub page_break_before: bool,
pub background_color: bool,
pub top_margin: bool,
pub text_indent: bool,
pub semantic_role: bool,
}Expand description
Selects which optional block attributes the djot importer applies to the document model. An attribute present in the source but disabled here is parsed and discarded, exactly like an unrepresentable construct.
Fields§
§alignment: boolApply paragraph alignment from {alignment=left|right|center|justify}.
line_height: boolApply line height from {line_height=<int>}.
direction: boolApply text direction from {direction=ltr|rtl}.
non_breakable_lines: boolApply non-breakable lines from {non_breakable_lines=true|false}.
page_break_before: boolApply “start on a new page” from {page_break_before=true|false}.
background_color: boolApply block background color from {background_color="<value>"}.
top_margin: boolApply the block’s own space-above from {top_margin=<int>}, overriding
the document-wide paragraph spacing for that one block.
text_indent: boolApply the block’s own first-line indent from {text_indent=<int>},
overriding the document-wide first-line indent for that one block.
semantic_role: boolCarry the frame’s semantic role from {semantic_role=epigraph}. Unlike its
neighbours this one describes the enclosing blockquote, not the paragraph it
is written on: it rides the quote’s first block because that is the only channel
djot block attributes have, and the importer moves it onto the frame.
Implementations§
Trait Implementations§
Source§impl Clone for DjotImportOptions
impl Clone for DjotImportOptions
Source§fn clone(&self) -> DjotImportOptions
fn clone(&self) -> DjotImportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more