Self-Evident / OneFileCMS

A single file cms - all in one file!
http://onefilecms.com/
165 stars 57 forks source link

WYSIWYG (TinyMCE) not working #17

Closed BenjaminEHowe closed 11 years ago

BenjaminEHowe commented 11 years ago

I don't even get an "Edit WYSIWYG" button with the default config. By adding $WYSIWYG_PLUGIN = 'plugins/tinymce/tiny_mce.js'; to config.php I get a button, but nothing changes when I press it. I'm using PHP 5.3.10.

What gives?

Self-Evident commented 11 years ago

"What gives?"

Umm... something's not working??  :) Ok, maybe not the most helpful response...

Well, the first obvious question is (just to be sure) - did you download & install TinyMCE (it's not included in the OneFileCMS)? However, I'm fairly sure you have, otherwise the [Edit WYSIWYG] button shouldn't even appear. I'm not at my test setup, but I'll check it out later.  Why can't everything just work like it's supposed to?!

----- Original Message ----- From: benzeman Sent: 11/30/12 05:40 AM To: Self-Evident/OneFileCMS Subject: [OneFileCMS] WYSIWYG (TinyMCE) not working (#17)

I don't even get an "Edit WYSIWYG" button with the default config. By adding $WYSIWYG_PLUGIN = 'plugins/tinymce/tiny_mce.js'; to config.php I get a button, but nothing changes when I press it. I'm using PHP 5.3.10.

What gives?

BenjaminEHowe commented 11 years ago

A question I ask myself too... nd yeah, got the tinymce files :-)

Self-Evident commented 11 years ago

Well, I'm a bit befuddled - everythings works for me...  :)

The only thing I can think of is that something's not right...  Ok, again - not very helpful, I know...

Actually, the only real thing I can think of is that my instructions are not as clear as they should be (crystal clearity in one's mind can be quite murky in another's...) So, I'm gonna go over the setup here in a bit more detail than what's currently provide in the OneFileCMS repo, and maybe something will pop out as the cause.  

1) Obtain TinyMCE  (Obvious, but just for completeness sake.) 2) Un-zip TinyMCE into a "plugins" folder: //website/plugins/tinymce 3) Copy tinymce_init.php from the OneFileCME repo to: //website/plugins/tinymce_init.php 4) In onefilecms.php, edit or add the configuration parameters:   $WYSIWYG_PLUGIN = 'plugins/tinymce_init.php';     $WYSIWYG_SOURCE = 'plugins/tinymce/jscripts/tiny_mce/tiny_mce.js';   5) In tinymce_init.php, the following should be the first line (after the opening comments, which can be deleted):  

It's also possible to test out tinymce directly - seperate from OneFileCMS - by browsing to it's examples folder:

//website/plugins/

Do you have access to a different server setup for comparison/testing?  Maybe a test setup on your local PC, such as Unifor Server (a very easy to use WAMP)?

A thought I just had- have you, or can you also try CKEditor?  That could at least answer the generality of the issue.

----- Original Message ----- From: benzeman Sent: 11/30/12 05:51 PM To: Self-Evident/OneFileCMS Subject: Re: [OneFileCMS] WYSIWYG (TinyMCE) not working (#17)

A question I ask myself too... nd yeah, got the tinymce files :-)

Self-Evident commented 11 years ago

Ok, didn't mean to send that last note yet...

It's also possible to test out tinymce directly - seperate from OneFileCMS - by browsing to it's examples folder: //website/plugins/tinymce/examples

(and, of course, the "plugins" folder may have another name, as long as the references in $WYSIWYG_PLUGIN and $WYSIWYG_SOURCE match up.

Anyway, sorry if that doesn't help much, it's all I could think of at moment.  Let me know if there's something that doesn't make sense.

----- Original Message ----- From: benzeman Sent: 11/30/12 05:51 PM To: Self-Evident/OneFileCMS Subject: Re: [OneFileCMS] WYSIWYG (TinyMCE) not working (#17)

Self-Evident commented 11 years ago

Ok, I think the issue is tied to the location of the onefilecms.php file - the wysiwyg option doesn't show up if onefilecms.php is not in the root folder of the website. I guess I didn't test that setup. It's probably an easy fix, but it'll probably take me the next several hours to resolve it. But, in the meantime, there's a workaround...maybe...

Self-Evident commented 11 years ago

It wasn't exactly difficult, but it wasn't really very easy, either. In any case, I believe it's fixed.