我的闪亮应用程序的闪亮仪表板框中有一个 helpText 小部件。
Shinydashboard::box() 之外的 helpText 可以轻松格式化,但是,在 box() 中,不考虑换行符以及其他 HTML 元素。
请在下面找到我的代码和我当前获得的图像。
validation_rules_text_cas<-helpText('Please enter one string per line.', # ----
"A CAS Registry Number includes up to 10 digits which are separated in 3 hyphens.",
'- The first part of the number, starting from the left, has 2 to 7 digits',
'- The second part has 2 digits',
'- The final part consists of a single check digit.')
validation_rules_text_inchikey<-helpText('Please enter one string per line.',
"International Chemical Identifier KEY validation rules. InChIKey consists of several distinct components:",
"- 14 characters resulting from a hash of the connectivity information of the InChI,encodes molecular skeleton (connectivity),",
"- followed by a hyphen,",
"- followed by 8 characters resulting from a hash of the remaining layers of the InChI,",
"- Encodes proton positions (tautomers), stereochemistry, isotopomers, reconnected layer,",
"- followed by a single character indicating the kind of InChIKey,",
"- followed by a single character indicating the version of InChI used,",
"- another hyphen,",
"- followed by single character indicating protonation.(Source: Wikipedia).",
" AAAAAAAAAAAAAA-BBBBBBBBCD-E")
tabPanel("Batch Search", #----
fluidRow(column(5),
column(7,# helpText----
box(title=' CAS Validation Rules',width=12,
collapsible = TRUE,
collapsed=TRUE,
status = 'primary',
validation_rules_text_cas
),
box(title='Inchikey Validation Rules',width=12,
collapsible = TRUE,
collapsed=TRUE,
status = 'primary',
validation_rules_text_inchikey
),
box(title='SMILES Validation Rules',width=12,
collapsible = TRUE,
collapsed=TRUE,
status = 'primary',
validation_rules_text_smiles
),
box(title='Validation Rules - OTHER',width=12,
collapsible = TRUE,
collapsed=TRUE,
status = 'primary',
validation_rules_text_other
))
))
如何添加新换行符 (tags$br()) 或新行 (tags$hr())?谢谢