locked
Ckeditor inject text via. Page_Load C# RRS feed

  • Question

  • User-81166443 posted

    Hey guys :) ive made this so far

            <textarea cols="80" id="txtEditor" name="txtEditor" rows="10"></textarea>
    			<script type="text/javascript">
    			    CKEDITOR.replace('txtEditor',
    					{
    					    language: 'da',
    					    toolbar: [['Bold', 'Italic', 'Underline', 'Strike', '-', 'Link', '-', 'TextColor', 'BGColor', '-', 'Format', 'Font', 'FontSize', 'Smiley']],
    					    resize_enabled: false,
    					    removePlugins: 'elementspath',
    					    
    					});
                </script>


    now my problem is that i have some difficulty to inject text on Page_Load

    Tried to do something like this

     var text = (from o in _entities.Threads
                             where o.ID == ForumID
                             select o.Text).First();
    
                var texteditor = Page.Request.Form["txtEditor"];
                texteditor = text.ToString();


    but it gets cleared when plugin is ready.. Tried to make the textarea runat="server" but just make the plugin un-renderable.. Any ideas?? :D 

    Tuesday, October 5, 2010 5:27 PM

All replies