Layout in R Shiny app that include R Markdown file

I am facing a problem with the layout in R Shiny when I use the R Markdown file inside it I get the final result in a wired layout size (small and only in the middle of the screen ) as shown in the following photo:

Attached to you the code:


library(shiny)
library(shinydashboard)
library(knitr)

ui <- 
    dashboardPage(
      dashboardHeader(title ='Virtual Excursion'), 
      
      dashboardSidebar( sliderTextInput(
        inputId = "mySliderText", 
        label = "Story line", 
        grid = TRUE, 
        force_edges = TRUE,
        choices = c('1','2')
      )
      ),
      dashboardBody(
        fluidRow(
          column(9,  
                 box(
                   title = "Operations ", 
                   closable = FALSE, 
                   width = 9,
                   status = "primary", 
                   solidHeader = FALSE, 
                   collapsible = TRUE,
                   uiOutput("operations")
                 )
          )
        ), 
        fluidRow(
          column(9, 
                 box(
                   title = "Challenges", 
                   closable = FALSE, 
                   width = 9,
                   status = "primary", 
                   solidHeader = FALSE, 
                   collapsible = TRUE,
                   uiOutput("challenges")
                 )
          ) 
        )
      )
    )
    

server <- function(input, output,session){
  
  output$operations <- renderUI({
    req(input$mySliderText==1)
    
    HTML(markdown::markdownToHTML(knit('trial1.rmd', quiet = TRUE)))
    
  })
  
  
}

shinyApp(ui = ui, server = server)

Could you please guide me on how to fix this problem!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.