<div class="html_editor" data-bind="css: {'inactive': inactive() && !disableEdit()}, onEsc: onEscHandler, initDom: htmlEditorDom">
	<div class="disable_mask" data-bind="visible: disableEdit"></div>
	<div class="toolbar" data-bind="initDom: toolbarDom">
		<div class="content">
			<a href="javascript:void(0);" class="item undo" data-bind="click: undo, customTooltip: '%MODULENAME%/ACTION_UNDO'">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item redo" data-bind="click: redo, customTooltip: '%MODULENAME%/ACTION_REDO'">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item bold" data-bind="click: bold, customTooltip: '%MODULENAME%/ACTION_SET_BOLD', css: { active: isFWBold() }">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item italic" data-bind="click: italic, customTooltip: '%MODULENAME%/ACTION_SET_ITALIC', css: { active: isFSItalic() }">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item underline" data-bind="click: underline, customTooltip: '%MODULENAME%/ACTION_SET_UNDERLINE', css: { active: isTDUnderline() }">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item strike_through" data-bind="click: strikeThrough, customTooltip: '%MODULENAME%/ACTION_SET_STRIKETHROUGH', css: { active: isTDStrikeThrough() }">
				<span class="icon"></span>
			</a>
			
			<span class="separator"></span>

			<div class="item select font">
				<select class="input" data-bind="value: selectedFont, foreach: aFonts, enable: !inactive()" style="height: 21px;">
					<option data-bind="text: $data, value: $data, style: {'fontFamily': $data}"></option>
				</select>
			</div>

			<div class="item select font_size">
				<select class="input" data-bind="value: selectedSize, enable: !inactive()" style="height: 21px;">
					<option value="2" data-bind="i18n: {'key': '%MODULENAME%/ACTION_CHOOSE_SMALL_TEXTSIZE'}" style="font-size: 13px;"></option>
					<option value="3" data-bind="i18n: {'key': '%MODULENAME%/ACTION_CHOOSE_NORMAL_TEXTSIZE'}" style="font-size: 16px;"></option>
					<option value="5" data-bind="i18n: {'key': '%MODULENAME%/ACTION_CHOOSE_LARGE_TEXTSIZE'}" style="font-size: 24px;"></option>
					<option value="7" data-bind="i18n: {'key': '%MODULENAME%/ACTION_CHOOSE_HUGE_TEXTSIZE'}" style="font-size: 48px;"></option>
				</select>
			</div>

			<a href="javascript:void(0);" class="item color" data-bind="click: textColor, 
			   css: {'expand': visibleFontColorPopup}, initDom: colorPickerDropdownDom, customTooltip: '%MODULENAME%/ACTION_SET_COLOR'">
				<span class="icon"></span>
				<span class="dropdown color">
					<span class="dropdown_helper">
						<span class="dropdown_content">
							<!-- ko template: { name: oFontColorPickerView.ViewTemplate, data: oFontColorPickerView } --><!-- /ko -->
							<!-- ko template: { name: oBackColorPickerView.ViewTemplate, data: oBackColorPickerView } --><!-- /ko -->
						</span>
					</span>
				</span>
			</a>

			<span class="separator"></span>

			<a href="javascript:void(0);" class="item slist" data-bind="click: numbering, customTooltip: '%MODULENAME%/ACTION_SET_NUMBERING', css: { active: isEnumeration() }">
				<span class="icon"></span>
			</a>

			<a href="javascript:void(0);" class="item uslist" data-bind="click: bullets, customTooltip: '%MODULENAME%/ACTION_SET_BULLETS', css: { active: isBullets() }">
				<span class="icon"></span>
			</a>

			<span class="separator"></span>
			
			<a href="javascript:void(0);" class="item hline" data-bind="click: insertHorizontalLine,
					visible: bAllowHorizontalLineButton,
					customTooltip: '%MODULENAME%/ACTION_INSERT_HLINE'">
				<span class="icon"></span>
			</a>

			<span class="separator" data-bind="visible: bAllowHorizontalLineButton"></span>
			
			<a href="javascript:void(0);" class="item link" data-bind="click: insertLink, 
			   css: {'expand': visibleInsertLinkPopup}, initDom: insertLinkDropdownDom, customTooltip: '%MODULENAME%/ACTION_INSERT_LINK'">
				<span class="icon"></span>

				<span class="dropdown">
					<span class="dropdown_helper">
						<span class="dropdown_content">
							<span data-bind="i18n: {'key': '%MODULENAME%/LABEL_URL'}"></span>:
							<input class="input" type="text" data-bind="value: linkForInsert, hasfocus: linkFocused, 
									onFocusSelect: true, valueUpdate: 'afterkeydown', onEnter: insertLinkFromPopup" />
							<span class="button" data-bind="click: insertLinkFromPopup, i18n: {'key': '%MODULENAME%/ACTION_INSERT'}"></span>
							<span class="button" data-bind="click: closeInsertLinkPopup, i18n: {'key': 'COREWEBCLIENT/ACTION_CANCEL'}"></span>
						</span>
					</span>
				</span>
			</a>

			<a href="javascript:void(0);" class="item image" data-bind="click: insertImage, 
					visible: bAllowInsertImage, css: {'expand': visibleInsertImagePopup}, initDom: insertImageDropdownDom, customTooltip: '%MODULENAME%/ACTION_INSERT_IMAGE'">
				<span class="icon"></span>

				<span class="dropdown">
					<span class="dropdown_helper">
						<span class="dropdown_content">
							<span data-bind="visible: bAllowFileUpload">
								<span data-bind="i18n: {'key': '%MODULENAME%/LABEL_SELECT_IMAGE'}"></span>:
								<br />
								<span class="button" data-bind="initDom: imageUploaderButton, i18n: {'key': '%MODULENAME%/ACTION_CHOOSE_FILE'}"></span>
								<br />
								<span data-bind="i18n: {'key': '%MODULENAME%/LABEL_ENTER_IMAGE_URL'}"></span>:
							</span>
							<span data-bind="visible: !bAllowFileUpload, i18n: {'key': '%MODULENAME%/LABEL_ENTER_IMAGE_URL_ONLY'}"></span>
							<br />
							<input class="input" type="text" data-bind="value: imagePathFromWeb" style="width: 200px;" />
							<span class="button" data-bind="click: insertWebImageFromPopup, i18n: {'key': '%MODULENAME%/ACTION_INSERT'}"></span>
							<span class="button" data-bind="click: closeInsertImagePopup, i18n: {'key': 'COREWEBCLIENT/ACTION_CANCEL'}"></span>
						</span>
					</span>
				</span>
			</a>

			<a href="javascript:void(0);" class="item clear" data-bind="click: removeFormat, customTooltip: '%MODULENAME%/ACTION_REMOVE_FORMAT'">
				<span class="icon"></span>
			</a>
			
			<a href="javascript:void(0);" class="item rtl" data-bind="visible: bAllowChangeInputDirection, click: setRtlDirection, customTooltip: '%MODULENAME%/ACTION_SET_RTL_DIRECTION'">
				<span class="icon">rtl</span>
			</a>
			<a href="javascript:void(0);" class="item ltr" data-bind="visible: bAllowChangeInputDirection, click: setLtrDirection, customTooltip: '%MODULENAME%/ACTION_SET_LTR_DIRECTION'">
				<span class="icon">ltr</span>
			</a>
			
			<span class="separator" data-bind="visible: templates().length > 0"></span>
			
			<a href="javascript:void(0);" class="item template" data-bind="visible: templates().length > 0, click: toggleTemplatePopup, 
					css: {'expand': visibleTemplatePopup}, customTooltip: '%MODULENAME%/ACTION_INSERT_TEMPLATE'">
				<span class="icon"></span>
				<span class="dropdown">
					<span class="dropdown_helper">
						<span class="dropdown_content" data-bind="customScrollbar: {x: false}">
							<span class="scroll-inner">
								<!-- ko foreach: templates -->
								<div data-bind="text: subject, click: function (oViewModel, oEvent) { $parent.insertTemplate(text, oEvent); }"></div>
								<!-- /ko -->
							</span>
						</span>
					</span>
				</span>
			</a>
		</div>
	</div>

	<div class="workarea" data-bind="customScrollbar: {x: true, y: true}, initDom: workareaDom">
		<div class="scroll-inner" data-bind="attr: {'id': creaId}"></div>
		
		<div data-bind="initDom: uploaderAreaDom, css: {'active': editorUploaderBodyDragOver}" class="uploader_mask">
			<div class="inner"></div>
		</div>
	</div>
	
	<div class="inline_popup image_tooltip" data-bind="visible: imageSelected,
		 style: {'top': tooltipPopupTop() + 'px', 'left': tooltipPopupLeft() + 'px'},
		 text: tooltipText"></div>
	
	<div class="inline_popup" data-bind="visible: visibleLinkPopup, initDom: linkPopupDom">
		<a target="_blank" data-bind="text: linkHref, attr: {'href': linkHref}, click: function () { hideLinkPopup(); return true; }"></a>
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_CHANGE_URL'}, click: showChangeLink"></span>
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_REMOVE'}, click: function () { oCrea.removeCurrentLink(); }"></span>
	</div>
	<div class="inline_popup" data-bind="visible: visibleLinkHref, initDom: linkHrefDom">
		<input type="text" spellcheck="false" data-bind="value: linkHref" />
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_OK'}, click: changeLink"></span>
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_CANCEL'}, click: hideChangeLink"></span>
	</div>
	<div class="inline_popup" data-bind="visible: visibleImagePopup, 
			style: {'top': imagePopupTop() + 'px', 'left': imagePopupLeft() + 'px'}">
		<span class="button" data-bind="i18n: {'key': '%MODULENAME%/ACTION_MAKE_IMAGE_SMALL'}, click: function () { resizeImage(Enums.HtmlEditorImageSizes.Small); }"></span>
		<span class="button" data-bind="i18n: {'key': '%MODULENAME%/ACTION_MAKE_IMAGE_MEDIUM'}, click: function () { resizeImage(Enums.HtmlEditorImageSizes.Medium); }"></span>
		<span class="button" data-bind="i18n: {'key': '%MODULENAME%/ACTION_MAKE_IMAGE_LARGE'}, click: function () { resizeImage(Enums.HtmlEditorImageSizes.Large); }"></span>
		<span class="button" data-bind="i18n: {'key': '%MODULENAME%/ACTION_MAKE_IMAGE_ORIGINAL'}, click: function () { resizeImage(Enums.HtmlEditorImageSizes.Original); }"></span>
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_REMOVE'}, click: function () { oCrea.removeCurrentImage(); }"></span>
	</div>
</div>
