Skip to content

Text decorator functions for all elements? #27

@robinkrahl

Description

@robinkrahl

Is it possible to implement text decorator functions for all elements? The current implementations for plain and rich text are already very helpful, but I would like to tweak the appearance of some specific elements. Let’s say I want to print headings with a bold typeface or I want to set the color based on the element’s class. This could be done with functions like:

fn decorate_element_start(&self, name: &str, attrs: HashMap<String, String>) -> Self::Annotation
fn decorate_element_end(&self, name: &str) -> Self::Annotation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions