[CLOSED] Editor does not deal with all HTML Character Codes properly

  1. #1

    [CLOSED] Editor does not deal with all HTML Character Codes properly

    I have a simple editor set up similar to your example in https://examples1.ext.net/#/Editor/Basic/Overview/ on the last tab, "Editor Panel".

    I noticed that some characters are converted to their HTML Character Codes in source view and some are not. Most other text editors will convert all the special characters to their HTML Character Codes while in WYSIWYG mode which makes dealing with the text easier.

    Some examples are double quote (") and single quote ('). See the attached image for an example where I test certain characters to see if they get converted or not when flicking between WYSIWYG and Source view.

    Can you let me know if this could be changed, or if not then I will have to code in some workaround to get it to work how I want.

    Cheers.
    Attached Thumbnails Click image for larger version. 

Name:	html_codes.JPG 
Views:	401 
Size:	87.0 KB 
ID:	2119  
    Last edited by geoffrey.mcgill; Jan 18, 2011 at 4:31 PM. Reason: [CLOSED]
  2. #2
    Hi,

    This issue is reproducible with this simple example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:HtmlEditor runat="server" />
        </form>
    </body>
    </html>
    I tested the characters that you pointed under IE8, FF 3.6.12 and Chrome 8 and this issue appears under IE8 only.

    FF and Chrome doesn't encode single quote and double quote characters.

    I don't know why IE encodes these characters... Trying to find any information via Google.
  3. #3
    Hi,

    HtmlEditor uses browser ability to turn any element to the design mode
    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

    Unfortunately, that feature implementation is very different between browsers (and even OS). Also, we cannot change editor behaviour because it totaly under the browser control

    For example, compare behaviour of HtmlEditor and div element under design mode
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body style="padding:10px;">
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <p>1. Ext.Net editor</p>
            <ext:HtmlEditor ID="HtmlEditor1" runat="server" Height="100" />
            <ext:Button runat="server" Text="Show editor value">
                <Listeners>
                    <Click Handler="alert(#{HtmlEditor1}.getValue());" />
                </Listeners>
            </ext:Button>
            
            <br />
            <p>Native design mode for DIV element</p>        
            <div id="divEditor1" contenteditable="true" style="height:100px;width:500px;border:solid 1px black;"> 
            </div>
            <ext:Button runat="server" Text="Show editor value">
                <Listeners>
                    <Click Handler="alert(#{divEditor1}.dom.innerHTML);" />
                </Listeners>
            </ext:Button>
        </form>
    </body>
    </html>
  4. #4

    Editor not cross-browser compatible

    OK thanks - I understand. So I guess the way the editor works we can't really say it's "cross browser compatible" because it has different behaviour in different browsers.

    In that case, do you know any WYSIWYG editors that integrate nicely into Ext.NET? I have previously used FCKEditor and TinyMCE - do you have any advice on which might be best, or any others you know of? I wanted to use the Ext.NET Editor to reduce the size of my pages so I guess I should figure out which one is the smallest.

    Cheers.
  5. #5
    Hi,

    Unfortunately, I have no expirience with those editors therefore I cannot suggest which can be best. Try to search FCKEditor vs TinyMCE discussions via Google

Similar Threads

  1. Exporting Grid Data for Excel, CSV, XML, HTML, PDF [EXAMPLE Codes]
    By fatihunal in forum Examples and Extras
    Replies: 6
    Last Post: Oct 07, 2016, 1:50 PM
  2. Replies: 0
    Last Post: Jun 22, 2012, 10:17 AM
  3. Replies: 2
    Last Post: Feb 21, 2011, 5:22 AM
  4. [CLOSED] HTML editor with IE 8
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 17, 2010, 7:59 AM
  5. [CLOSED] html editor
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 24, 2009, 11:06 AM

Tags for this Thread

Posting Permissions