[RESOLVED]How to bind to ajax editor or?

Hi

I’ve got small project where on the aspx page is placed a CKeditor with some bindings. The CKeditor doesn’t work properly so I want to change it to ajaxtoolkit editor. But in the first line of the script for the CKeditor is CKEDITOR.replace("Ideforum1$dvemne$txtbeskrivelse"…
How do I bind this to the ajax editor?

The code behind is vb:

ProtectedSub btnOpretEmne_Click(sender As Object, e As System.EventArgs)Handles btnOpretEmne.Click, btnOpret2.Click

       panelOpretEmne.Visible =True

        panelEmneliste.Visible =False

        btnOpretEmne.Visible =False

       CType(dvEmner.FindControl("txtTitel"),TextBox).Text = ""

       CType(dvEmner.FindControl("txtBeskrivelse"), HtmlControls.HtmlTextArea).InnerHtml =""

   End Sub

 

the code on the aspx page:

<textareaid="txtBeskrivelse"runat="server" rows="3" cols="15"></textarea>

              

                    <cc1:EditorID="Editor1" runat="server" />

                   <%–<script type="text/javascript">

                       CKEDITOR.replace("Ideforum1$dvEmner$txtBeskrivelse", {

                            toolbar_Basic:

                  [

     ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],

    ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'],

    ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],

    ['Smiley']

                   ],

                            toolbar: ‘Basic’,

                            entities: false,

                            entities_latin: false,

                            entities_greek: false,

                            language: ‘dk’

                        });

                    </script>–%>

thx

Hi,

You can use the ajax control toolkit html editor with follow code:

<ajaxToolkit:HtmlEditorExtender ID="HtmlEditorExtender1"
            TargetControlID="TextBox1" DisplaySourceTab="true"
            runat="server"/>
            <Toolbar>
                <ajaxToolkit:Undo />
                <ajaxToolkit:Redo />
                <ajaxToolkit:Bold />
                <ajaxToolkit:Italic />
                <ajaxToolkit:Underline />
                <ajaxToolkit:StrikeThrough />
                <ajaxToolkit:Subscript />
                <ajaxToolkit:Superscript />
                <ajaxToolkit:JustifyLeft />
                <ajaxToolkit:JustifyCenter />
                <ajaxToolkit:JustifyRight />
                <ajaxToolkit:JustifyFull />
                <ajaxToolkit:InsertOrderedList />
                <ajaxToolkit:InsertUnorderedList />
                <ajaxToolkit:CreateLink />
                <ajaxToolkit:UnLink />
                <ajaxToolkit:RemoveFormat />
                <ajaxToolkit:SelectAll />
                <ajaxToolkit:UnSelect />
                <ajaxToolkit:Delete />
                <ajaxToolkit:Cut />
                <ajaxToolkit:Copy />
                <ajaxToolkit:Paste />
                <ajaxToolkit:BackgroundColorSelector />
                <ajaxToolkit:ForeColorSelector />
                <ajaxToolkit:FontNameSelector />
                <ajaxToolkit:FontSizeSelector />
                <ajaxToolkit:Indent />
                <ajaxToolkit:Outdent />
                <ajaxToolkit:InsertHorizontalRule />
                <ajaxToolkit:HorizontalSeparator />
                <ajaxToolkit:InsertImage />
            </Toolbar>
        </ajaxToolkit:HtmlEditorExtender>

More details, please refer to:

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/HTMLEditorExtender/HTMLEditorExtender.aspx and
http://www.asp.net/ajaxlibrary/act_HTMLEditor.ashx .

Leave a Reply