Editor Academic Suite — 6 components for academic and scholarly writing tools.
Provides citation style selection, structure validation, abbreviation management, readability scoring, page numbering, and margin notes for building full-featured academic editors.
Components
citation_style_selector/1— dropdown to choose citation format (APA, MLA, Chicago, etc.)structure_validator/1— panel displaying document structure rule violationsabbreviation_manager/1— table of abbreviation definitions with delete actionsreading_level_indicator/1— progress bar showing readability score with color codingpage_numbering/1— "Page N of M" display with numeric/roman/letter formatsmargin_note/1— absolutely positioned aside for side annotations
Summary
Functions
Renders a table of abbreviation definitions with delete actions.
Renders a <select> dropdown for choosing a citation style.
Renders an absolutely positioned <aside> for side annotations.
Renders a "Page N of M" text display with configurable number format.
Renders a 0-100 progress bar showing readability score with color coding.
Renders a panel showing document structure rule violations.
Functions
Renders a table of abbreviation definitions with delete actions.
Each abbreviation is a map with :short and :full keys.
Example
<.abbreviation_manager
id="abbr-mgr"
abbreviations={[
%{short: "HTML", full: "HyperText Markup Language"},
%{short: "CSS", full: "Cascading Style Sheets"}
]}
/>Attributes
id(:string) (required)abbreviations(:list) - Defaults to[].class(:string) - Defaults tonil.- Global attributes are accepted.
Renders a <select> dropdown for choosing a citation style.
Example
<.citation_style_selector id="cite-style" value={:apa} />Attributes
id(:string) (required)value(:atom) - Defaults to:apa. Must be one of:apa,:abnt,:mla,:chicago,:harvard, or:ieee.class(:string) - Defaults tonil.- Global attributes are accepted.
Renders an absolutely positioned <aside> for side annotations.
Must be placed inside a position: relative parent container. The note
appears on the specified side of the content area.
Example
<div class="relative">
<p>Main content here...</p>
<.margin_note id="note-1" side={:right}>
This is a side annotation.
</.margin_note>
</div>Attributes
id(:string) (required)side(:atom) - Defaults to:right. Must be one of:left, or:right.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Renders a "Page N of M" text display with configurable number format.
Formats:
:numeric— "Page 1 of 10":roman— "Page I of X":letter— "Page A of J"
Example
<.page_numbering current={3} total={15} format={:roman} />Attributes
current(:integer) - Defaults to1.total(:integer) - Defaults to1.format(:atom) - Defaults to:numeric. Must be one of:numeric,:roman, or:letter.class(:string) - Defaults tonil.- Global attributes are accepted.
Renders a 0-100 progress bar showing readability score with color coding.
- Red (score < 30): Difficult to read
- Amber (score 30-59): Moderate readability
- Green (score >= 60): Easy to read
When no score is provided, shows "Not calculated" placeholder.
Example
<.reading_level_indicator score={72} label="Grade 8" />Attributes
score(:any) - Defaults tonil.label(:string) - Defaults tonil.class(:string) - Defaults tonil.- Global attributes are accepted.
Renders a panel showing document structure rule violations.
Each violation is a map with :rule, :message, and :severity keys.
Severity values: :error, :warning, :info.
Example
<.structure_validator
id="validator"
violations={[
%{rule: "abstract", message: "Missing abstract section", severity: :error},
%{rule: "heading", message: "Consider adding sub-headings", severity: :warning}
]}
/>Attributes
id(:string) (required)rules(:list) - Defaults to[].violations(:list) - Defaults to[].class(:string) - Defaults tonil.- Global attributes are accepted.