Apr 06, 2010, 8:50 AM
[CLOSED] HTML Editor - insert image with relative path
Hello
I have a webpage with a simple html editor contained within it.
<ext:Panel ID="pnlHelpContent" runat="server" StyleSpec="padding-left: 6px;" Title="Help Content" Icon="Help" Layout="fit" frame="true">
<Items>
<ext:Panel ID="pnlContent" runat="server" StyleSpec="Padding: 6px" BodyStyle="padding: 6px; background-color: #ffffff; border: 1px solid #99bbe8;" Layout="fit" frame="false" AutoScroll="true">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="btnEdit" runat="server" Text="Edit" Icon="Pencil">
<Listeners>
<Click Fn="btnEditClick" />
</Listeners>
</ext:Button>
<ext:Button ID="btnSave" runat="server" Text="Save" Icon="Disk" Disabled="true">
<Listeners>
<Click Fn="btnSave_Click" />
</Listeners>
</ext:Button>
<ext:Button ID="btnCancel" runat="server" Text="Cancel" Icon="Cancel" Disabled="true">
<Listeners>
<Click Fn="btnCancelClick" />
</Listeners>
</ext:Button>
<ext:ToolbarFill ID="ToolbarFill1" runat="server"></ext:ToolbarFill>
<ext:Label ID="lblModified" runat="server" Hidden="true"></ext:Label>
<ext:ToolbarSpacer Width="4" runat="server" ID="ctl67"></ext:ToolbarSpacer>
</Items>
</ext:Toolbar>
</TopBar>
</ext:Panel>
<ext:Editor ID="pnlEditor" runat="server" Shadow="None" AutoSize="Fit" ignoreNoChange="true">
<Field>
<ext:HtmlEditor ID="htmlEditor" runat="server" >
<Listeners>
<Render Handler="htmlEditorRender(this)" />
</Listeners>
</ext:HtmlEditor>
</Field>
</ext:Editor>
</Items>
</ext:Panel>
I insert images into the editor using a button that i have added to the editors toolbar,
function htmlEditorRender(htmlEditor) {
htmlEditor.tb.addSeparator();
htmlEditor.tb.addButton({ handler: insertHandler, iconCls: 'icon-image', tooltip: 'Insert Image<br>Upload a new image or insert an existing image' });
}
</PRE>when i insert the image i only want the relative path of the image to be displayed, however, when i click on the view html option on the editor the full image path is being displayed.
function insertHandler() {
htmlEditor.execCmd('InsertImage', 'ImageHandler.ashx?ImageID=' + opImage[0].data.ImageID + '&fullsize=true');
}
</PRE>Could you please advise me how to prevent the editor from containing the full image path and just displaying the relative path?Thank You
</PRE>