Welcome Guest, Not a member yet? Register   Sign In
Problems integrating TinyMCE
#1

[eluser]Packe[/eluser]
Hi,

I have seen several threads about implementing TinyMCE into a CI installation. I have tried a few of the ways to do without any success.

I have tried these two:
http://ericlbarnes.com/develop/codeignit...h-tinymce/
http://ellislab.com/forums/viewthread/65061/

But I always have the same result: my <textarea> elements do not have the editor.

Can someone please tell me what I am doing wrong?

Thanks in advance!

Regards,
Packe
#2

[eluser]metaltapimenye[/eluser]
show your code please. at least controller+view part. thx packe
#3

[eluser]Packe[/eluser]
The code has not been added to any controller or view, but the index.php which all views uses to load their content.
#4

[eluser]metaltapimenye[/eluser]
in index.php?!.. show the code where you invoke tinyMCE, i used to attach it at view script. i cannot imagine woh if it comes from index.php >_<
#5

[eluser]Packe[/eluser]
Here is my index.php which I have stripped of unnecessary HTML code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;&lt;/title>
&lt;meta name="keywords" content="" /&gt;
&lt;meta name="description" content="" /&gt;
&lt;link rel="stylesheet" href="&lt;?php echo base_url()."assets/css/styles.css"?&gt;" type="text/css" media="screen, projection, tv" /&gt;
&lt;!-- TinyMCE --&gt;
[removed][removed]
[removed]
tinyMCE.init({
    mode : "textareas"
});
[removed]

&lt;/head&gt;
&lt;body&gt;
      &lt;?=$content."\n"?&gt;
&lt;/body&gt;
&lt;/html&gt;

The variable $content is used by views to show different content. for example a form with textareas. I have it this way in order to only have 1 file with the site layout.
#6

[eluser]InsiteFX[/eluser]
Well that was real smart!

CodeIgniter sets everything up using the index.php!

So I would reinstall CodeIgniter and start over.

Enjoy
InsiteFX
#7

[eluser]brianw1975[/eluser]
I'm going to take a different approach to your problem and, maybe stupidly, assume that you have not edited the main index.php file, but instead have your main view file named index.php

With that assumption out of the way, I am going to ask this: if you use a .htaccess file to remove index.php from the URL, did you update/edit your .htaccess file so that the browser can get access to /assets

If you don't use a .htaccess, have you CTRL-SHIFT-Reloaded the site in your browser? Sometimes things like this aren't updated because of browser cache.

Next, have you verified that your browser can get to the tinyMCE.js file directly through the address bar?



[quote author="Packe" date="1252424274"]Here is my index.php which I have stripped of unnecessary HTML code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;&lt;/title>
&lt;meta name="keywords" content="" /&gt;
&lt;meta name="description" content="" /&gt;
&lt;link rel="stylesheet" href="&lt;?php echo base_url()."assets/css/styles.css"?&gt;" type="text/css" media="screen, projection, tv" /&gt;
&lt;!-- TinyMCE --&gt;
[removed][removed]
[removed]
tinyMCE.init({
    mode : "textareas"
});
[removed]

&lt;/head&gt;
&lt;body&gt;
      &lt;?=$content."\n"?&gt;
&lt;/body&gt;
&lt;/html&gt;

The variable $content is used by views to show different content. for example a form with textareas. I have it this way in order to only have 1 file with the site layout.[/quote]
#8

[eluser]Packe[/eluser]
For clarification, I have not edited the index.php found in the same folder as the system folder (the root of the site) but the index.php found in the view folder.

thanks brian for the help, I have used the search and I know it works!! Tried the tips found... but still having problem.




Theme © iAndrew 2016 - Forum software by © MyBB