2016-12-12 6 views
1

Shiny RアプリケーションでsplitLayoutを使用して、左側にプロット(googleVisgVisGeoChartオブジェクト)と右側のHTMLを持つ2パネル構造を作成しています。Shiny splitLayoutがHTMLテキストをラップしない

これは、問題のコードのモックアップである:

splitLayout(

    htmlOutput("mychart"), #This winds up rendering properly to the left side of the window 

    div(
     h1("A descriptive heading"), 
     p("Here's some text that takes more than one line on the screen. I want it to wrap, but it just keeps going to the right out of view in its container.")  
    ) #This text will not wrap to the right side of the splitLayout frame 
) 

P()コマンド内のテキストは、splitLayoutによって作成されたページの(1/2)可視に折り返さないであろう。代わりに、(目に見えない)右に行くので、ユーザーはそれをすべて見るためにスクロールする必要があります。これは望ましい行動ではありません(かなり率直に言って、私はそれがどこにあるのか想像がつかない)。

テキストをsplitLayout領域に正しくラップする方法を教えてください。

+0

実は、私の質問のコードブロックの表示は、エラーの良い例です。 Shinyは、フレームにテキストをラップするのではなく、そのようなページの右1/2にHTMLを描画します。 – MJG

答えて

0

追加のスタイル=「ワードラップ:ブレークワードが;」:

p("Here's some text that takes more than one line on the screen. I want it to wrap, but it just keeps going to the right out of view in its container.",style = "word-wrap: break-word;") 
関連する問題