允许在 Rad Telerik 多行文本框中输入键

Allow enter key inside Rad Telerik Multiline Textbox

我希望我的 Telerik 文本框允许在其中输入键,当我使用样式时它会被禁用。 我的代码:-

      <telerik:RadTextBox ID="txtContent" TextMode="MultiLine" Width="300" Height="85px"
                            MaxLength="150" runat="server" EnableEmbeddedSkins="false" Skin="Parcs" Style="white-space: normal;">
                        </telerik:RadTextBox> 

Style="white-space: normal;" it is not allowing enter key inside textbox.

谢谢

出于某种原因 white-space: normal 样式无法在 RadTextBox 的多行模式下正常工作(在 IE 11 中找到,不确定其他浏览器中是否存在)。尝试使用 white-space: pre !important; 代替:

<telerik:RadTextBox ID="txtContent" TextMode="MultiLine" Width="300" Height="85px"
                    MaxLength="150" runat="server" EnableEmbeddedSkins="false" Skin="Parcs" 
                    Style="white-space: pre !important;">
</telerik:RadTextBox> 

或使用 RadInput CSS class 引用 textarea 并在其中添加 pre 设置:

.RadInput textarea {
    white-space: pre !important;
}

参考文献:

Enter key not work with radtextbox multiple line

RadTextBox multiline problem in IE 11