This is a migrated thread and some comments may be shown as answers.

ImageManager and Editor question - before i buy

3 Answers 73 Views
Editor
This is a migrated thread and some comments may be shown as answers.
mike
Top achievements
Rank 1
mike asked on 28 Apr 2008, 05:51 PM
hi all,
we are considering purchasing the Telerik controls for use in a fairly adavanced project we have upcoming.  I just have a couple quick questions i would like answered before i go ahead with a purchase:

The EDITOR:
is it possible to create a new button which would allow me to use a custom server side control in a WYSIWYG editor?  For example we will be allowing "non-tech" users to create small html units to put on a site.  However all the links they will put in need to be trackable.  so i want to create a button that will put in a custom tag or control i create in the editor.  So that when its rendered on the page any hyperlink is actually a server side control that performs some database tracking before redirecting the user to the destination

THE IMAGE MANAGER:
we are kind of going for a cms "like" interface for the admin utility.  basically going from templated "fill in fields" kind of thing to enabling users to have a freeform html area they can do anything in.  We need a central image repository for them to utilize and on the admin side they need to be able to upload images to this repo, then select them for use in their new html editor.  Obviouslly once the site is published we need to be able to use these same images on the rendered pages, is this image manager built for something like this?

thats about it for now,
thanks in advance,
mcm

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 May 2008, 09:09 AM
Hi Mike,

We will be glad to welcome you as a customer.

Straight to the questions:
  1. RadEditor is a client-side browser tool, providing the ability to visually edit pure HTML text using the underlying Rich Text Editing engine of the browser. This browser engine supports only standard HTML/XHTML tags and plain text.

    Please, note that if you put a server tag in RadEditor the editor will not strip the tag, but will not render it in Design mode.

    The ASP tags are not HTML tags and the browser is not able to visualize them.
    The browser cannot visualize XML Tags and when you put <asp:button> in the editor, the server-side framework will not parse the content (as it is part of the editor, not part of the page).
    So, instead of sending to the client the HTML tag <input type=button> it will send <asp:button> - which means nothing to the browser.

    To achieve your scenario you can write your own custom tag that has a namespace. Internet Explorer and Firefox recognize such custom tags and you can easily style them. Here is an example:

    <my:Link ID="Link1" style="border: 1px solid red;width: 50px; height: 20px;color: blue" runat="server" Text="Link" >button</my:Link>

    Please, note that in order to be recognized by the browser the custom tag should have a namespace: <namespace:TagName></namespace:TagName>

    You can find more information in the following MSDN article: Using Custom Tags in Internet Explorer.

    After that you use the String.Replace server method to replace the custom tag with the desired server control on the server.

    You can see how to add a custom button to the editor's toolbar in the following  help article:
    Adding Your Own Buttons.  You can insert content in the editor with the  editor.pasteHtml() method.
     
  2. Yes, the Image manager of RadEditor can be used in CMS systems to upload images on the admin site to a centralized storage and later display them on the public part of the site.

    My suggestion is to test the trial version of RadEditor and see exactly how the editor will behaves in your CMS. If any other questions pop up during the evaluation, just let us know and we will be glad to help.
Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shaun Peet
Top achievements
Rank 2
answered on 01 May 2008, 01:35 PM
Hi Rumen,

I had no idea that was even remotely possible.  Could the server-side concept be extended to include telerik controls and datasource controls?  For example, would there be any way to add a Rotator to the page via the editor, add a datasource control, set the properties of each, and then link the two?  Obviously it wouldn't need to "rotate" within the designer but it would need to work on the finished page.  Just thinking about it makes my head hurt.  If it's possible just imagine how useful it would be for Sitefinity!

Shaun.
0
mike
Top achievements
Rank 1
answered on 01 May 2008, 02:03 PM
thanks for the informative answers. 
i realize that inserting a custom server control into the editor will not allow it to be viewed in design mode.  this was already anticipated and as such we will have a separate preview button outside of the editor which will render the content.  I played around with creating a custom toolbar and buttons and it seems to do the trick for what we need.   I did download the trial and will be testing it over the next week or so.  thanks for the help.
mcm
Tags
Editor
Asked by
mike
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Shaun Peet
Top achievements
Rank 2
mike
Top achievements
Rank 1
Share this question
or