Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i tried to use tinymce rich textbox in my webpage, but it is not working!
this is the asp page

ASP.NET
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>
        <script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas",
        theme: "advanced",
        plugins: "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
        theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: false,
        template_external_list_url: "js/template_list.js",
        external_link_list_url: "js/link_list.js",
        external_image_list_url: "js/image_list.js",
        media_external_list_url: "js/media_list.js"
    });
</script>
    </title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div id="content">
        
        <table style="width:100%;">
            <tr>
                <td style="width:100px;">العنوان:</td>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server" Width="253px" AutoCompleteType="Disabled"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>الموضوع:</td>
                <td rowspan="16">
                    <asp:Panel ID="Panel1" runat="server" BackColor="Silver" Direction="RightToLeft">
                    </asp:Panel>
                    <asp:TextBox ID="TextBox2" runat="server" AutoCompleteType="Disabled" Height="413px" TextMode="MultiLine" Width="781px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td> </td>
            </tr>
            <tr>
                <td style="width:100px;">القسم:</td>
                <td>
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="18px" Width="145px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width:100px;"> </td>
                <td>
<%--                    <asp:TextBox ID="RichTextBox" runat="server" TextMode = "MultiLine"></asp:TextBox>

        <asp:Button ID="btnSave" runat="server" Text="Save" />

        <asp:Button ID="btnCancel" runat="server" Text="Cancel" />           

        <asp:Label ID="lblDisplay" runat="server" Text="" Visible = "false" ></asp:Label>
                --%></td>
            </tr>
            <tr>
                <td style="width:100px;">الفئة العمرية:</td>
                <td>
                    <asp:DropDownList ID="DropDownList2" runat="server" Height="16px" Width="145px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width:100px;">العنوان:</td>
                <td>
                    <asp:Button ID="Button1" runat="server" Text="اضافة" Width="145px" OnClick="Button1_Click" />
                </td>
            </tr>
            <tr>
                <td style="width:100px;"> </td>
                <td>
                    <asp:Label ID="Label3" runat="server"></asp:Label>
                </td>
            </tr>
        </table>

    </div>
</asp:Content>


but this what appear when i run it
http://im35.gulfup.com/NrGds.jpg[^]

what's wrong ?
Posted
Comments
ZurdoDev 4-May-13 22:56pm    
What's wrong? I don't know. What should it look like? What is wrong with it?
Salah Abualrob 5-May-13 4:29am    
it is rich textbox, it must contain controls for font size, family .. etc

1 solution

it is rich textbox, it must contain controls for font size, family .. etc

You did not add RichTextBox, but TextBox and you name it as RichTextBox.
ASP.NET
<asp:textbox id="RichTextBox" runat="server" textmode="MultiLine" xmlns:asp="#unknown"></asp:textbox>


If you want to add text editor functionality to your website, please, refer these links:
ASP.NET HTML Editor Control[^]
How to Create an HTML Editor for ASP.NET AJAX[^]
Rich Text Editor with ASP.NET[^]
Integrating TinyMCE Editor with ASP.NET[^]
20 excellent free rich text editors[^]
Rich Text Editor : The Official MS ASP.NET Forums[^]
 
Share this answer
 
Comments
RaviRanjanKr 5-May-13 14:09pm    
My 5+
Maciej Los 5-May-13 14:19pm    
Thank you ;)
Salah Abualrob 6-May-13 15:41pm    
thanks :)
Maciej Los 7-May-13 15:13pm    
You're welcome ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900