Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
sorin

Advanced Tinymce Doesn't Work

Recommended Posts

I tried to put tinymce advanced but I don't see it on the page. The path is corect, because I selected with the "browse".

I don't know why doesn't work. This is the code that I put it on my site:

<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php if (isset($page_title)) {
                	echo $page_title;
                } else {
                	echo 'Knowledge is Power';
                }
			?></title>
	<link rel="stylesheet" href="css/styles.css" type="text/css" />
    <script type="text/javascript" src="../tinymce_3.5.11/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
    

	<script type="text/javascript">
    tinyMCE.init({
            // General options
            mode : "textareas",
            theme : "advanced",
            plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    
            // Theme options
            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
            theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing : true
    });
    </script>

</head>

<body>
<div id="container">
	<div id="header">
    	<h1><a href="/">Orange</a></h1>
        <h2>multilingual cms</h2>
        <div class="clear"></div>
    </div>
    <div id="nav">
    	<ul>
        	<?php
            	// This array represents the main navigation items. The key for each element
				//	is the text to be displayed on the tab
            	$pages = array (
                    'Home' => 'index.php',
                    'About' => 'about.php',
                    'Register' => 'register.php',
                    'Contact' => 'contact.php'
                    );
                
                /*              
                If the user is viewing  http://www.example.com/dir/file.php, then $_SERVER['PHP_SELF'] will have a value of /dir/file.php. To get just the file.php part of that, the basename( ) function is applied.
                */
                $this_page = basename($_SERVER['PHP_SELF']);
                
                // Loop through each page
                foreach ($pages as $k => $v) {
					echo '<li';
                    // Add the class if it’s the current page:
					if ($this_page == $k) echo ' class="selected"';
                    echo '><a href="' . $v . '"><span>' . $k . '</span></a></li>';
                 } // End of FOREACH loop.
             ?>
        </ul>
    </div>
    <div id="body">
		<div id="content">

Share this post


Link to post
Share on other sites

ReferenceError: tinyMCE is not defined.

 

On google I saw that means that the path is not good, but I took the path with browse from src.

Share this post


Link to post
Share on other sites

Yeah, your path is probably wrong. I'd check your sources (in the browser's developer tools) to see if anything is failing to load.

Share this post


Link to post
Share on other sites

Yes Larry the path was wrong. The correct one was

 <script type="text/javascript" src="tinymce_3.5.11/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>

One more question about tinymce:

why the width doesn't work. I tried to put

tinyMCE.init({
            // General options
            mode : "textareas",
            theme : "advanced",
            width : 300,
            plugins : 

but doesn't work. Can you please give an idea?

http://www.aproapetot.ro/php-multi-language-site/contact.php

Share this post


Link to post
Share on other sites

It's been a while since I've looked at TinyMCE in any detail, so I don't know what's going on with the width issue. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...