tiny mce使用twitter bootstrap更改文本区域宽度

时间:2013-12-20 05:21:41

标签: css twitter-bootstrap user-interface browser tinymce

我在表单中使用Tiny MCE和twitterbootstrap。

Tiny MCE更改文本元素的正常宽度。知道如何解决它。我不想硬编码宽度,因为它是一个reponsive设计。

以下是相关的代码段:

.control-group
  %label.control-label  Location
  .controls
    .input-prepend
      %input#location.input.span6{:name => "job[location]", :placeholder => "Location", :type => "text"}/
.control-group
  %label.control-label  Description
  .controls
    .input-prepend
      %textarea#message.input.span6{:name => "job[desc]", :rows => "10", :placeholder => "Paste Job Description. Formatting would be preserved"}

这是我使用的JS:

:javascript
  tinymce.init({selector:'textarea'});

我使用和不使用tinymce附加2个视图: without tiny mce

with tiny-mce

1 个答案:

答案 0 :(得分:0)

Tiny MCE隐藏textarea并添加div所以类span6到textarea不会影响div。

您可以将父div添加到textarea并为其提供课程span6

像这样的东西

.control-group
  %label.control-label  Description
  .controls
    .input-prepend
      .row
        .span6
           %textarea#message.input.span6{:name => "job[desc]", :rows => "10", :placeholder => "Paste Job Description. Formatting would be preserved"}