pub struct HtmlOptions {
pub node_tags: HashMap<String, String>,
pub mark_tags: HashMap<String, String>,
pub unknown_node: UnknownNodePolicy,
pub unknown_mark: UnknownMarkPolicy,
pub self_closing: SelfClosingStyle,
pub spread_attrs: bool,
pub text_align: bool,
}Expand description
Options controlling HTML rendering. Default matches Tiptap conventions.
Fields§
Override/extend the node→tag map with simple wrappers (e.g. callout→aside).
Override/extend the mark→tag map with simple wrappers (e.g. highlight→mark).
unknown_node: UnknownNodePolicyHow to render unknown node types.
unknown_mark: UnknownMarkPolicyHow to render unknown mark types.
self_closing: SelfClosingStyleVoid-element style.
spread_attrs: boolEmit a node’s remaining (non-structural) attrs as HTML attributes.
Off by default — arbitrary attribute names are an injection footgun.
text_align: boolEmit style="text-align:…" for paragraph/heading textAlign attrs.
Trait Implementations§
Source§impl Clone for HtmlOptions
impl Clone for HtmlOptions
Source§fn clone(&self) -> HtmlOptions
fn clone(&self) -> HtmlOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HtmlOptions
impl Debug for HtmlOptions
Source§impl Default for HtmlOptions
impl Default for HtmlOptions
Source§impl<'de> Deserialize<'de> for HtmlOptionswhere
HtmlOptions: Default,
impl<'de> Deserialize<'de> for HtmlOptionswhere
HtmlOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HtmlOptions
impl PartialEq for HtmlOptions
Source§fn eq(&self, other: &HtmlOptions) -> bool
fn eq(&self, other: &HtmlOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HtmlOptions
impl Serialize for HtmlOptions
impl StructuralPartialEq for HtmlOptions
Auto Trait Implementations§
impl Freeze for HtmlOptions
impl RefUnwindSafe for HtmlOptions
impl Send for HtmlOptions
impl Sync for HtmlOptions
impl Unpin for HtmlOptions
impl UnsafeUnpin for HtmlOptions
impl UnwindSafe for HtmlOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more