pub struct Options {Show 20 fields
pub selection_mode: SelectionMode,
pub use_virtual_edit: bool,
pub use_paging_optimization: bool,
pub show_line_numbers: bool,
pub show_status_line: bool,
pub show_cursor: bool,
pub use_spans: bool,
pub use_for_ssg: bool,
pub use_background: bool,
pub theme_name: Option<String>,
pub syntax_token: String,
pub occupy_container: bool,
pub page_size: usize,
pub use_syntax_highlighter: bool,
pub use_smart_replace_insert: bool,
pub allow_text_selection: bool,
pub scroll_cursor_into_view: bool,
pub enable_context_menu: bool,
pub enable_keypresses: bool,
pub enable_click: bool,
}
Fields§
§selection_mode: SelectionMode
block selection uses rectangular text selection linear selection select lines as most text editors
use_virtual_edit: bool
allow the click outside of the bounds of the text content editor
use_paging_optimization: bool
allow the editor to show or hide pages for optimization Note: set this to false when using the editor as a headless buffer
show_line_numbers: bool
show line numbers
show_status_line: bool
show the status line
show_cursor: bool
show virtual cursor
use_spans: bool
use spans instead of div when rendering ranges and characters this is used when doing a static site rendering
use_for_ssg: bool
when used for ssg, whitespace will be rendered as
use_background: bool
apply background on the characters from syntax highlighter
theme_name: Option<String>
The syntect theme name used for syntax highlighting
syntax_token: String
the syntax token used for text highlighting, usually the PL name ie: rust, typescript, sql
occupy_container: bool
whether or not the editor occupy the container element false means the editor only expands to the number of lines in the code
page_size: usize
number of lines in a page, when paging up and down
use_syntax_highlighter: bool
a flag to use syntax highlighting or not
use_smart_replace_insert: bool
a flag to do replace mode when there is no characters to the right and switch to insert mode when there is characters to the right
allow_text_selection: bool
allow the user to select text via browser native text selection
scroll_cursor_into_view: bool
always put the cursor into view
show context menu when user right clicks on the editor
enable_keypresses: bool
if enabled, the editor will listen to keypresses if disabled, it will not react to keypresses default: true
enable_click: bool
clicking on the editor will set the cursor location at the click location
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.