Home Search Member List Faq Register Login  
UltimateEditor
Re: Formatting issue using UE to compose email messages

Thread Starter: dfortner   Started: 07-24-2007 4:09 PM   Replies: 7
 Karamasoft Support Forums » General Discussions » UltimateEditor » Re: Formatting issue using UE to compose email messages
 Printable Version    « Previous Thread   Next Thread »
  24 Jul 2007, 4:09 PM
dfortner is not online. Last active: 11/4/2008 5:40:40 PM dfortner

Not Ranked
Joined on 07-24-2007
Posts 4
Formatting issue using UE to compose email messages
We have an application that is distributing information (via emal) to a group registered users.  The application uses UE to compose the body of the message and create a template message if they choose to do so.

We would like to start creating some messages with a more advanced design using style sheets.  The problem I'm having is utilizing style sheets in the message.  I'm finding that the editor will strip out everything between the <style> tags.  It also strips out the <link> tag for referencing a style sheet.

I'm using the TextBoxCssFiles attribute to set the style sheet for the editor but how do I get the message to use the style sheet once the email is sent if the editor keeps stripping everything out?

  
  24 Jul 2007, 4:49 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Formatting issue using UE to compose email messages
You cannot directly insert link or style elements into editor content. However, in your page code-behind, you can append these elements as a text to the beginning of EditorHtml property of your UltimateEditor control.
  
  02 Nov 2007, 9:10 AM
jereed is not online. Last active: 11/6/2007 2:46:46 PM jereed

Top 10 Posts
Joined on 05-22-2007
Posts 8
Re: Formatting issue using UE to compose email messages
Is there a way to disable the editor removing <link> and <style> tags?  I am using the editor in a course management system and instructors need to use external style sheets defined by their university.
  
  02 Nov 2007, 12:23 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Formatting issue using UE to compose email messages
UltimateEditor does not allow link or style tags but it lets you set TextBoxCssFiles property so that you can apply the stylesheet definitions in an external CSS file inside the editor. TextBoxCssFiles property gets or sets the CSS file names in comma separated form used by the text box. You can set it as follows:

<cc1:UltimateEditor id="UltimateEditor1" runat="server" TextBoxCssFiles="yourcssfilename1.css,yourcssfilename2.css" />

Make sure that you are using a path starting with http:// to make it work for Mozilla browsers as well.

  
  05 Nov 2007, 9:31 AM
jereed is not online. Last active: 11/6/2007 2:46:46 PM jereed

Top 10 Posts
Joined on 05-22-2007
Posts 8
Re: Formatting issue using UE to compose email messages
Thanks for the response, however that will not work for me. 

My course management system is a hosted service and the instructors come from universities all over the world (http://www.epsilen.com).  Each individual instructor has their own tastes and style for presenting course content. 

I need the ability to disable all your filtering (i.e. link, style, relatvie url's, etc.). As a programmer, I prefer to control what is filtered and what is not on the server side.

If you cannot do this with this editor, I will have to find another one that will.  I would like to continue using the Karamasoft editor, but this filtering issue and some other buggy issues are causing me to change my mind. 




  
  05 Nov 2007, 12:01 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Formatting issue using UE to compose email messages
The new version of UltimateEditor, which will be released in a couple of weeks, will have style dropdown functionality so that you can define your stylesheet definitions in UltimateEditor.xml file and they will be displayed in a dropdown in the editor toolbar and when selected, the style will be applied to the text selected inside the editor. However, we are not sure if this will work for you since you want to display different style values for different users, which might require you to define different XML files depending on the user. UltimateEditor will not allow style or link elements in the new version. Sorry for any inconvenience.
  
  06 Nov 2007, 2:45 PM
jereed is not online. Last active: 11/6/2007 2:46:46 PM jereed

Top 10 Posts
Joined on 05-22-2007
Posts 8
Re: Formatting issue using UE to compose email messages
Thanks again for the fast response.

You are right.  The problem for me is that there is no possible way to even begin to define all those styles.  We do not control what an instructor's lesson looks like, we only provide the engine to create one. 

Basically we provide a page to the Instructor that has this editor on it.  Using this editor they can do whatever they want (except JavaScript) in terms of html layout, style, content, etc.  Some Institutions actually mandate the use of a pre-defined (unknown to us though) style sheet that can be "linked" to.  The fact that we have members and instructors from over 600 institutions makes it impossible for us to "pre-define" all that.

You answer stated that you cannot allow style or link elements.  Is this intentional or a result of something outside of your control?

Thanks

  
  08 Nov 2007, 12:05 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Formatting issue using UE to compose email messages

Internet Explorer has a strange behavior when you set innerHTML property of document body element. If the text you want to set starts with style or link tag, Internet Explorer just truncates it. However, if it starts with some other text and then style and link tag, then it keeps it. Firefox doesn't have this issue. For example, if you switch to HTML tab in the editor and paste the following:

<style>.redcolor {color:red;}</style>
<span class="redcolor">test</span>

Then, switch back to Design mode and then HTML mode, you will see that style element disappears because Internet Explorer removes it when innerHTML is set.

However, if you try the following:

<span class="redcolor">test</span>
<style>.redcolor {color:red;}</style>

Then, switch back to Design mode, you will see that the text is shown in red and when you switch back to HTML mode, the style element is retained.

As a workaround for the time being, if you want to add style or link element, please make sure that you place it at the end or there is some text in front of it.

We will address this issue in the new release which is scheduled to be released in a couple of weeks and let you know if the issue is resolved.


  
 Page 1 of 1 (8 items)
Karamasoft Support Forums » General Discussions » UltimateEditor » Re: Formatting issue using UE to compose email messages

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2021 Karamasoft LLC. All rights reserved.