• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblockdocument.php
  • Класс: CIBlockDocument
  • Вызов: CIBlockDocument::createAdditionalHtmlEditor
function createAdditionalHtmlEditor(tableId)
			{
				var tbl = document.getElementById(tableId);
				var cnt = tbl.rows.length-1;
				var name = tableId.replace(/(?:CBPVirtualDocument_)(.*)(?:_Table)/, '$1')
				var idEditor = 'id_'+name+'__n'+cnt+'_';
				var inputNameEditor = name+'[n'+cnt+']';
				window.BXHtmlEditor.Show(
					{
						'id':idEditor,
						'inputName':inputNameEditor,
						'content':'',
						'useFileDialogs':false,
						'width':'100%',
						'height':'200',
						'allowPhp':false,
						'limitPhpAccess':false,
						'templates':[],
						'templateId':'',
						'templateParams':[],
						'componentFilter':'',
						'snippets':[],
						'placeholder':'Text here...',
						'actionUrl':'/bitrix/tools/html_editor_action.php',
						'cssIframePath':'/bitrix/js/fileman/html_editor/iframe-style.css?1412693817',
						'bodyClass':'',
						'bodyId':'',
						'spellcheck_path':'/bitrix/js/fileman/html_editor/html-spell.js?v=1412693817',
						'usePspell':'N',
						'useCustomSpell':'Y',
						'bbCode':false,
						'askBeforeUnloadPage':true,
						'settingsKey':'user_settings_1',
						'showComponents':true,
						'showSnippets':true,
						'view':'wysiwyg',
						'splitVertical':false,
						'splitRatio':'1',
						'taskbarShown':false,
						'taskbarWidth':'250',
						'lastSpecialchars':false,
						'cleanEmptySpans':true,
						'lazyLoad':false,
						'showTaskbars':false,
						'showNodeNavi':false,
						'controlsMap':[
							{'id':'Bold','compact':true,'sort':'80'},
							{'id':'Italic','compact':true,'sort':'90'},
							{'id':'Underline','compact':true,'sort':'100'},
							{'id':'Strikeout','compact':true,'sort':'110'},
							{'id':'RemoveFormat','compact':true,'sort':'120'},
							{'id':'Color','compact':true,'sort':'130'},
							{'id':'FontSelector','compact':false,'sort':'135'},
							{'id':'FontSize','compact':false,'sort':'140'},
							{'separator':true,'compact':false,'sort':'145'},
							{'id':'OrderedList','compact':true,'sort':'150'},
							{'id':'UnorderedList','compact':true,'sort':'160'},
							{'id':'AlignList','compact':false,'sort':'190'},
							{'separator':true,'compact':false,'sort':'200'},
							{'id':'InsertLink','compact':true,'sort':'210','wrap':'bx-b-link-'+idEditor},
							{'id':'InsertImage','compact':false,'sort':'220'},
							{'id':'InsertVideo','compact':true,'sort':'230','wrap':'bx-b-video-'+idEditor},
							{'id':'InsertTable','compact':false,'sort':'250'},
							{'id':'Code','compact':true,'sort':'260'},
							{'id':'Quote','compact':true,'sort':'270','wrap':'bx-b-quote-'+idEditor},
							{'id':'Smile','compact':false,'sort':'280'},
							{'separator':true,'compact':false,'sort':'290'},
							{'id':'Fullscreen','compact':false,'sort':'310'},
							{'id':'BbCode','compact':true,'sort':'340'},
							{'id':'More','compact':true,'sort':'400'}],
						'autoResize':true,
						'autoResizeOffset':'40',
						'minBodyWidth':'350',
						'normalBodyWidth':'555'
					});
				var htmlEditor = BX.findChildrenByClassName(BX(tableId), 'bx-html-editor');
				for(var k in htmlEditor)
				{
					var editorId = htmlEditor[k].getAttribute('id');
					var frameArray = BX.findChildrenByClassName(BX(editorId), 'bx-editor-iframe');
					if(frameArray.length > 1)
					{
						for(var i = 0; i < frameArray.length - 1; i++)
						{
							frameArray[i].parentNode.removeChild(frameArray[i]);
						}
					}

				}
			}