Change to Ckeditor instead of tinyMCE

Editor
May 18, 2012 at 2:59 PM

OK so I moved to Ckeditor instead of using tinyMCE Ckeditor is better IMHO. Anway the problem I am facing is that it is not working now I know why it is not working. 

 

You see the orignal razorC with tinyMCE has @section head{} wrapped around it, for some reason when you use CkEditor and have @section head{} wrapped around the Javascript it will not work. Is it safe to remove the @section head?

 

 @section head {
<!-- You can use any editor you want. We decided to use TinyMCE visit http://tinymce.moxiecode.com/ for licence and help -->
<!-- TinyMCE -->

 <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
   <script type="text/javascript">
			//<![CDATA[

				CKEDITOR.replace( 'pText',
					{
						fullPage : false,
						extraPlugins : 'docprops'
					});

			//]]>
			</script>

<!-- /TinyMCE -->
}


Because of @section head the WYSIWYG editor does not load. Can I safely remove section head or will I face errors in the future? 

 

Coordinator
May 18, 2012 at 3:41 PM

You should not remove the "section head"

simply move this part of the code from "section head" after the textarea ("pText") and it will work just fine (take a look at samples that are included with the plugin you decided to use)

 

<script type="text/javascript">
//<![CDATA[

CKEDITOR.replace( 'pText',
{
fullPage : false,
extraPlugins : 'docprops'
});

//]]>
</script>

Coordinator
May 20, 2012 at 10:31 PM

Did it work for you ???