Add code to the default rich text configuration (#406)

This commit is contained in:
Patrick Arminio 2024-07-21 13:14:22 +02:00 committed by GitHub
parent d2b0520f86
commit b8f9fafed0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -46,7 +46,7 @@ pub enum LoroError {
ArgErr(Box<str>),
#[error("Auto commit has not started. The doc is readonly when detached. You should ensure autocommit is on and the doc and the state is attached.")]
AutoCommitNotStarted,
#[error("You need to specify the style flag for \"({0:?})\" before mark with this key")]
#[error("Style configuration missing for \"({0:?})\". Please provide the style configuration using `configTextStyle` on your Loro doc.")]
StyleConfigMissing(InternalString),
#[error("Unknown Error ({0})")]
Unknown(Box<str>),

View file

@ -93,6 +93,13 @@ impl StyleConfigMap {
expand: ExpandType::None,
},
);
map.map.insert(
"code".into(),
StyleConfig {
expand: ExpandType::None,
},
);
map
}