I have a simple form using the TinyMce jQuery plugin. When I load the page, TinyMce is supposed to replace my textarea with his editor, but this does not happen. Looking at the html generated, my textarea is there (visibility set to hidden) but no iFrame object was created by TinyMce. The TinyMce object exists, but the activeEditor is null. It is as if I have not initialized it, but I am following the sample code exactly as follows:
//here is where I load the scripts
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.tinymce.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/tiny_mce_jquery.js")"></script>
// here is my text area
<textarea id="tinymceId" name="content" class="tinymce" rows="1" cols="50" style="width:100%;" ></textarea>
//and here is my script code where I initialize it
$(document).ready(function () {
$('#tinymceId').tinymce({
doctype: '<!DOCTYPE html>',
editor_selector: "tinymce",
convert_urls: false,
mode: "textareas",
});
});
Well, the most famous way of being cool nowadays is to use Nuget.
I have written some partial view templates for TinyMCE. (I also push TinyMCE to the feed when it is being updated)
Following article will walk you through for the process :
TinyMCE HTML Text Editior & ASP.NET MVC - Setting It Up Has Become Easy With Nuget
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With