by any chance did you forget to _echo_ the $javascript->link( ... )?
FYI: $scripts_for_layout only matters if you set the second parameter
($inline) of $javascript->link to false.
http://api.cakephp.org/class_javascript_helper.html#cab1eb59cacd608ec02e79cfd8710094
On Jul 21, 2:15 pm, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
> I just removed everything and decided to try again from scratch in
> case I messed up a step. Here are my steps in order as I did them:
>
> 1. Download TinyMCE
> 2. Unzip archive
> 3. Copy tinymce/jscripts/tiny_mce folder
> 4. paste it into /app/webroot/js folder
> 5. add the following code in my edit.ctp located at /app/views/news/
> edit.ctp
>
> $javascript->link('tiny_mce/tiny_mce');
>
> <script type="text/javascript">
> tinyMCE.init({
> theme : "simple",
> mode : "textareas",
> convert_urls : false
> });
> </script>
>
> The $javascript part is wrapped in php tags, the other is not. I have
> also included
>
> echo $scripts_for_layout;
>
> in my layout so that I can reference jscripts in my views instead.
>
> On Jul 21, 3:01 pm, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
>
> > And I get the same error with it as well. tinyMCE is not defined.
>
> > On Jul 21, 2:59 pm, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
>
> > > Okay and I just tried that tinyMCE helper, pretty simple apparently.
> > > However it does not work either. And I did exactly as they have in the
> > > tut, including copying and pasting all the code and creating the same
> > > file names in the same locations.
>
> > > On Jul 21, 2:52 pm, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
>
> > > > My tiny_mce folder is in the js folder. I switched my code around to
> > > > what yours is, no more errors, however the old ones are still there.
> > > > Predominantly the one that states that tinyMCE is not defined.
>
> > > > On Jul 21, 2:43 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>
> > > > > I have tinymce in the js directory
>
> > > > > this:
> > > > > echo $javascript->link('/js/tiny_mce/tiny_mce.js');
>
> > > > > is this in my case
> > > > > echo $javascript->link('tiny_mce/tiny_mce');
>
> > > > > javascript->link expects the file to be in the js directory and
> > > > > expects it
> > > > > to be a .js file
>
> > > > > I suspect that you've got mce in a directory that differs in some way
> > > > > from
> > > > > code written in your app
>
> > > > > Step through your app cross checking locations of files and anomalies
>
> > > > > the tiny mce helper might be of interest (I have'nt used it
> > > > > personally but
> > > > > it is
> > > > > there)http://bakery.cakephp.org/articles/view/tinymce-helper-1http://bakery......
>
> > > > > 2008/7/21 Arak Tai'Roth <[EMAIL PROTECTED]>:
>
> > > > > > hmmm, apparently it is looking for a tiny_mce controller from what I
> > > > > > can see.
>
> > > > > > On Jul 21, 2:11 pm, "Arak Tai'Roth" <[EMAIL PROTECTED]> wrote:
> > > > > > > Wow, can't believe I forgot to check that.
> > > > > > > But yes I am, tinyMCE is not defined in my coded included up
> > > > > > > above in /
> > > > > > > views/news/edit.ctp
>
> > > > > > > As well
> > > > > > > syntax error in the tiny_mce.js code here apparently
> > > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > > > > >http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> > > > > > > On Jul 21, 2:07 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > are you getting any javascript errors at all?
>
> > > > > > > > 2008/7/21 Arak Tai'Roth <[EMAIL PROTECTED]>:
>
> > > > > > > > > So I read over in the bakery how to install TinyMCE and use
> > > > > > > > > it with
> > > > > > > > > CakePHP.
>
> > > > > > > > > However, it's not working for me even though my code is
> > > > > > > > > essentially
> > > > > > > > > identical.
>
> > > > > > > > > Here is my code that is pertinent and locations of it:
> > > > > > > > > /views/layouts/admin.ctp:
> > > > > > > > > if (isset($javascript))
> > > > > > > > > {
> > > > > > > > > echo
> > > > > > $javascript->link('/js/tiny_mce/tiny_mce.js');
> > > > > > > > > }
>
> > > > > > > > > /views/news/edit.ctp:
> > > > > > > > > <script type="text/javascript">
> > > > > > > > > tinyMCE.init({
> > > > > > > > > theme : "simple",
> > > > > > > > > mode : "textareas",
> > > > > > > > > convert_urls : false
> > > > > > > > > });
> > > > > > > > > </script>
>
> > > > > > > > > echo $form->input('note', array('label'=>false, 'type' =>
> > > > > > > > > 'textarea',
> > > > > > > > > 'rows'=>7, 'cols'=>50));
>
> > > > > > > > > And yes I have the Javascript helper included in my
> > > > > > app_controller.php
> > > > > > > > > file.
> > > > > > > > > It's not displaying the WYSIWYG editor instead of the
> > > > > > > > > textarea box,
> > > > > > > > > still see the textarea box in all its normalness. Anyone have
> > > > > > > > > any
> > > > > > > > > ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---