Completed
Last Updated: 03 May 2016 14:16 by ADMIN
ADMIN
Nikolay
Created on: 07 Mar 2016 15:06
Category: UI for ASP.NET AJAX
Type: Bug Report
0
The content area element does not fit in the RadEditor's wrapper when EditModes is Design in Lightweight RenderMode
Markup to reproduce the issue:

<telerik:RadEditor ID="RadEditor1" runat="server" EditModes="Design" RenderMode="Lightweight">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
</telerik:EditorToolGroup>
</Tools>
<Content>
<p>test</p>
<p>test</p>
</Content>
</telerik:RadEditor>

Resolution:

<script type="text/javascript">
	(function ($UI) {
		$UI.SizerLightweight.prototype._calcUiHeight = function () {
			var that = this,
				view = that._view,
				editor = that.editor,
				calculator = new $UI.DimensionsCalculator(editor),
				toolBarContainer = view.toolBarContainer(),
				toolBarHeight = that._getComponentHeight(toolBarContainer),
				paddings = calculator.getComputedSizes(editor.get_element(), ["padding-top", "padding-bottom"]),
				margins = calculator.getComputedSizes(toolBarContainer, ["margin-bottom"]),
				borders = calculator.getComputedSizes(view.contentAreaContainer(), ["border-top-width", "border-bottom-width"]),
				modesHeight = that._getComponentHeight(view.modesRowContainer()),
				modulesHeight = that._getComponentHeight(view.modulesContainer());

			return toolBarHeight + modesHeight + modulesHeight + margins + borders + paddings;
		}
	})(Telerik.Web.UI.Editor.UI);
</script>
0 comments