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

Chp 5...Can'T Seem To See The Buttons?..Here Is The Code

Recommended Posts

<script type="text/javascript" src="ecommerce/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">

tinyMCE.init({

// General options

mode : "exact",

elements : "content",

theme : "advanced",

width : 800,

height : 400,

plugins : "advlink,advlist,autoresize,autosave,contextmenu,fullscreen,iespell,inlinepopups,media,paste,preview,safari,searchreplace,visualchars,wordcount,xhtmlxtras",

// Theme options

theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,removeformat,|,search,replace,|,cleanup,help,code,preview,visualaid,fullscreen",

theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,cite,abbr",

theme_advanced_buttons3 : "hr,|,link,unlink,anchor,image,|,charmap,emotions,iespell,media",

theme_advanced_toolbar_location : "top",

theme_advanced_toolbar_align : "left",

theme_advanced_statusbar_location : "bottom",

theme_advanced_resizing : true,

// Example content CSS (should be your site CSS)

content_css : "/css/styles.css",

});

</script>

Share this post


Link to post
Share on other sites

Had a problem when trying to understand and install tinyMCE - kept getting error "tinyMCE is not defined".

I've searched web and found several blogs (most several years old), but, none offered solution which

worked in my situation. Could you offer suggestion for remedy? Thanks.

 

 

MS Windows 7 Home Premium Service Pack 1

XAMPP vs 1.7.7

Apache/2.2.21 (Win32)

PHP vs 5.3.8

MySQL Server vs 5.5.16

TinyMCE vs 3.5.6

All files & folders under jscripts/tiny_mce extracted to C:/xampp/TinyMCE

"EnableSendfile off" uncommented in httpd.conf

 

TinyMCE test program located in C:/xampp/htdoc/TestTinyMCE.html as follows:

<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 

<head>

<script type="text/javascript" src="c:/xampp/TinyMCE/tiny_mce.js"></script>

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

tinyMCE.init({

mode : "textareas",

theme : "simple"

});

//]]></script>

</head>

<body>

<form>

<textarea name="content" cols="50" rows="15">

This is some content that will be editable with TinyMVE.

</textarea>

</form>

</body>

 

 

 

 

 

Firefox vs 13.0.1 - Firebug reported error as follows:

tinyMCE is not defined

[break On This Error]

tinyMCE.init({

TestTinyMCE.html (line 9)

Share this post


Link to post
Share on other sites

Okay, earlier you wrote:

All files & folders under jscripts/tiny_mce extracted to C:/xampp/TinyMCE

 

which would suggest your TinyMCE files are in the wrong place.

Share this post


Link to post
Share on other sites

Thanks.

I've deleted and reextracted all MCE files under folder "tinymce" which is under "htdocs".

Still no success. Is there some Apache configuration file which needs modification?

Thanks so much for your help.

Share this post


Link to post
Share on other sites

I'm not an expert with FireBug, however, when I run the "simple" tinyMCE example FireBug stops at the line:

 

tinMCE.init({

 

and FireFox's status seems to continually be reporting "connecting".

 

I'm stumped?

Share this post


Link to post
Share on other sites

Thanks Margaux... sorry about that (I'm embarassed), but, that was only in my post. As above in full list, script does contain 'y'.

 

I'm not an Apache expert, but, would my problem have anything to do with an ".htaccess" file? What log might I look at to see if there is an access problem (when searching web, saw this as possible issue - some people actually removed .htaccess file?)

 

Really appreciate all your suggestions.

 

Thanks

Share this post


Link to post
Share on other sites

Here is my code that works if it helps, check the directory settings, use a url relative to htdocs not a C drive location.

 

<script type="text/javascript" src="/knowledge_is_power/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "exact",
elements : "content",
theme : "advanced",
width : 800,
height : 400,
plugins : "advlink,advlist,autoresize,autosave,contextmenu,fullscreen,iespell,inlinepopups,media,paste,preview,safari,searchreplace,visualchars,wordcount,xhtmlxtras",
// Theme options
theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,removeformat,|,search,replace,|,cleanup,help,code,preview,visualaid,fullscreen",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,cite,abbr",
theme_advanced_buttons3 : "hr,|,link,unlink,anchor,image,|,charmap,emotions,iespell,media",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "/css/styles.css",
});
</script>

  • Upvote 1

Share this post


Link to post
Share on other sites

Wow!! Thanks everyone. Would have given up without your help!

Finally figured out WHY I was having a problem (dumb I guess)... once I coded the javascript as PCDATA (surrounding it with

"/* <![CDATA[ */" and "/* ]]> */") (I had coded my document as XHTML) it worked fine. I'm just stumbling along... sorry. Thanks for all your help and support.

Share this post


Link to post
Share on other sites

I have got the same problem whe trying to put tinyMCE into my web. I work on localhost, using windows xp and xampp. web page is on htdocs/eco and tinyMCE is on htdocs/eco/tinyMCE. Here is my code :

<script language="javascript" type="text/javacript" src='/tiny_mce/tiny_mce.js'></script>

<script type="text/javascript">

tinyMCE.init({

//ogolne opcje

 

mode : "exact", elements : "content", theme : "advanced", width : 800, height : 400,

plugins : "advlinks, advlist, autoresize, autosave, contextmenu, fullscrenn, iespellm inlinepopups, media, paste, preview, safari, searchreplace, visualchars, wordcount, xhtmlxtras",

// dostosowuje przyciski

theme_advanced_buttons1 : "cut, copy, paste, pastetext, pasteword, | , undo, redo, removeformat, | , search, replace, | , cleanup, help, code, preview, visualaid, fullscrenn",

theme_advanced_buttons2 : "bold, italic, underline, striketrought, | , justifyleft, justifycenter, justifyright, justifyfull, | , formatselect, | , bullist, numlist,|, outdent, indent, blockquote, | , sub, sup, cite, abbr",

theme_advanced_buttons3 : "hr, | , link, unlink, anchor, image, | , charmap, emotions, iespell, media",

// koncze konfiguracje edytora

theme_advanced_toolbar_location : "top",

theme_advanced_toolbar_align : "left",

theme_advanced_statusbar_location : "bottom",

theme_advanced_resizing: true,

content_css : "./includes/css/styles.css",

 

});

 

</script>

 

And I still have bug from error console web browser firefox : tinyMCE is not defined.

Share this post


Link to post
Share on other sites

I just forgot about 's' in type="text/javascript". I did change it but now i have got another bug. this.getDoc() is not defined I see that bug in Mozilla browser. In IE 7 everything is alright I can see the tiny editor. Most of time I use firefox and I would like see tiny editor in firefox.

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.

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...