<script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor colorpicker textpattern imagetools"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "print preview media | forecolor backcolor emoticons",
image_advtab: true,
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
</script>
<form method="post" action="somepage">
<textarea name="content" style="width:100%"></textarea>
</form>
I copied this code to my html file from this web address .php so when I copied it over to my html file and open it in a browser I get this:
it's just blank like a regular textarea not like what it shows at .php
any help
Thank You
<script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor colorpicker textpattern imagetools"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "print preview media | forecolor backcolor emoticons",
image_advtab: true,
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
]
});
</script>
<form method="post" action="somepage">
<textarea name="content" style="width:100%"></textarea>
</form>
I copied this code to my html file from this web address http://www.tinymce./tryit/full.php so when I copied it over to my html file and open it in a browser I get this:
it's just blank like a regular textarea not like what it shows at http://www.tinymce./tryit/full.php
any help
Thank You
Share Improve this question edited Oct 27, 2015 at 2:53 bot 4,9213 gold badges44 silver badges67 bronze badges asked Oct 27, 2015 at 2:42 user5365803user5365803 2- Your source is wrong src="<your installation path> – bot Commented Oct 27, 2015 at 2:47
- okay i see i need to fix it add it as a answer i will except it – user5365803 Commented Oct 27, 2015 at 2:49
1 Answer
Reset to default 4Your source is wrong src="<your installation path>"
change this to your installation path.
STEPS TO INSTALL TINYMCE:
Step 1: Download a copy of TinyMCE and put it on a web server.
Download a copy of the TinyMCE package from TinyMCE Downloads.
Unzip the package and move the "tinymce/js/tinymce"
directory into a web accessible location on your web server (for example, localhost).
Step 2: Add TinyMCE to a page.
With TinyMCE accessible via your web server (http://localhost/tinymce/), you can now include the TinyMCE script anywhere you would like to use the TinyMCE editor.
To add the script, add the following inside your page's tag.
<script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script>
Step 3: Initialize TinyMCE as Part of a Web Form
With the script included, you may then initialize TinyMCE on any element (or elements) in your webpage.
TinyMCE lets you identify elements to replace via a CSS3 selector. To add TinyMCE to a page you pass an object that contains a selector to tinymce.init().
In this example, you will replace with a TinyMCE editor by passing the selector '#mytextarea' to tinymce.init().
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "#mytextarea"
});
</script>
</head>
<body>
<h1>TinyMCE Getting Started Guide</h1>
<form method="post">
<textarea id="mytextarea"></textarea>
</form>
</body>
</html>
Source: http://www.tinymce./wiki.php/Installation