When I try to insert an image fromt he ImageManager, it comes back with <p><a href...></p> around it. I would like to make this always come back as a <div style="float:right"><a href...></div>.
Is there a way to make this happen?
Thanks!
Stacy
Is there a way to make this happen?
Thanks!
Stacy
4 Answers, 1 is accepted
0
Hi Stacy,
The images inserted from the Image Manager are standard <img> tags but not <a> tags.
If you would like to wrap the inserted <img> tag in a <div style="float:right></div> tag then you should attach to the OnClientPasteHtml event of RadEditor.
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The images inserted from the Image Manager are standard <img> tags but not <a> tags.
If you would like to wrap the inserted <img> tag in a <div style="float:right></div> tag then you should attach to the OnClientPasteHtml event of RadEditor.
The OnClientPasteHtml event is useful in scenarios where the developers need to examine or modify the HTML to be pasted by an editor tool before it is inserted in the editor content area. Some common cases where the event can be used are:
- Check whether user specified alt attribute for an image
- Make modifications to a table being inserted (e.g. set a specific classname, etc)
- Examine or modify a link before it is inserted
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Stacy
Top achievements
Rank 1
answered on 22 Oct 2008, 08:01 PM
Thanks! This helped me with the solution.
0
pmckay
Top achievements
Rank 1
answered on 24 Mar 2009, 09:18 PM
Hello ,
How would I attach this event ( OnClientPasteHtml event ) to any RadEditor used in the context of Sharepoint or WSS.
For instance this editor could appear on any page and the NewForm.aspx pages also
Thank you,
/Samir
How would I attach this event ( OnClientPasteHtml event ) to any RadEditor used in the context of Sharepoint or WSS.
For instance this editor could appear on any page and the NewForm.aspx pages also
Thank you,
/Samir
0
Hello Peter,
I am assuming that you are using the RadEditor for MOSS control. In order to attach to the OnClientPasteHtml event you need to do the following steps.
1. Modify the respective ConfigFile.xml (ListConfigFile.xml), which is located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.3.2.0__1f131a624888eeed\Resources folder (5.3.2.0__1f131a624888eeed depends on the version of the RadEditor for MOSS).
Add this code.
2. Add your javascript code in the MOSSEditorTools.js file, which is located in the mentioned above folder.
I hope this helps.
Greetings,
Stanimir
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
I am assuming that you are using the RadEditor for MOSS control. In order to attach to the OnClientPasteHtml event you need to do the following steps.
1. Modify the respective ConfigFile.xml (ListConfigFile.xml), which is located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.3.2.0__1f131a624888eeed\Resources folder (5.3.2.0__1f131a624888eeed depends on the version of the RadEditor for MOSS).
Add this code.
<property name="OnClientPasteHtml">OnClientPasteHtml</property> |
2. Add your javascript code in the MOSSEditorTools.js file, which is located in the mentioned above folder.
function OnClientPasteHtml(editor, args) |
{ |
//here is your code |
} |
I hope this helps.
Greetings,
Stanimir
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.