Hi All. Is it possible to associate a label with RadEditor? Like <label for="mycontrol"> or <asp:Label ID="Label1" runat="server" Text="Label" AssociatedControlID="mycontrol">. I noticed the final rendered HTML of RadEditor is a TextArea.
Daniel
1 Answer, 1 is accepted
0
Tervel
Telerik team
answered on 07 Aug 2009, 12:05 PM
Hi Daniel,
You can certainly associate a <label> element to any input control - if you know its client ID.
RadEditor is a very complex control which may look like a logical whole to the user, but certainly looks like a collection of various different elements to the browser. Hence, technically speaking - no, you cannot associate a label control with the editor itself, as there is no such thing as the editor from the browser's "point of view".
You can, however, associate it with a particular editor element. Since I am not aware of your scenario and I am not sure what you are trying to accomplish, I cannot recommend to which element. However, let me provide you with some information on the editor's internal workings.
The editor consists of
1. Content IFRAME element which is what you see in Design and Preview modes.
2. IFRAME element in which a TEXTAREA is inserted - this is what you see in Html mode.
3. A hidden TEXTAREA whihc is used as a placeholder for the editor's content - but this area is never visible, and never gets focus.
Of course there are various other elements, but I believe these are the ones that you are interested in. You can obtain the respective client IDs of these elements by using a tool such as IEDevToolbar or FireBug.