Won't Fix
Last Updated: 11 Jul 2016 17:22 by ADMIN
ADMIN
Marin Bratanov
Created on: 17 Oct 2013 10:08
Category: Editor
Type: Bug Report
0
FIX The advanced mode textbox in the Insert External Video dialog is always readonly
The Advanced Mode (embed code) textbox in the Insert External Video dialog is always readonly and you cannot put the code in it.

In the meantime you can use the following workaround that will access the textbox and remove the readonly attribute:

	<telerik:RadEditor ID="RadEditor1" runat="server" OnClientCommandExecuted="OnClientCommandExecuted">
		<Tools>
			<telerik:EditorToolGroup>
				<telerik:EditorTool Name="InsertExternalVideo" />
			</telerik:EditorToolGroup>
		</Tools>
	</telerik:RadEditor>
	<script type="text/javascript">
		function OnClientCommandExecuted(sender, args)
		{
			if (args.get_commandName() == "InsertExternalVideo")
			{
				var extVideoDialog = sender.get_dialogOpener()._dialogContainers["InsertExternalVideo"];
				if(extVideoDialog){
					extVideoDialog.add_pageLoad(editTextbox);
				}
			}
		}

		function editTextbox(sender, args)
		{
			sender.get_contentFrame().contentWindow.document.getElementById("embedCode").removeAttribute("readonly");
			sender.remove_pageLoad(editTextbox);
		}
	</script>
1 comment
ADMIN
Niko
Posted on: 11 Jul 2016 17:22
This textbox demonstrates the code that will be pasted in the editor content. It is deliberately made read-only, because there is no 2-way binding between its content and the rest of the UI elements in the dialog. Allowing editing will lead to changes between the video settings and the code, which may result it unexpected code added as content. That is why we have decided to leave the readonly attribute as is.