Giter Site home page Giter Site logo

tinymce's People

Contributors

ajibarra avatar andrej-griniuk avatar arusinowski avatar bfoultz-hc avatar cauancabral avatar destinydriven avatar didos avatar dogmatic69 avatar josegonzalez avatar krolow avatar lorenzo avatar markomarkovic avatar phpnut avatar predominant avatar rafaelqueiroz avatar ramkannanraj avatar real34 avatar rochamarcelo avatar steinkel avatar yeliparra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinymce's Issues

error loading tinymce plugin - does not work with multiple textareas

Hello,

I'm using the latest stable version of CakePHP 4.x, the latest version of the CakeDC/TinyMCE plugin, and the latest jQuery. I have followed your instructions for installing the plugin.

I use the following code in my view to enable the tinymce editor for my textareas:
$this->TinyMCE->editor(['theme' => 'modern', 'selector' => 'textarea']);

The editor is loaded for the first textarea, but with the following error displayed inside the textarea:

Failed to load plugin: style from url http://cdn.tinymce.com/4/plugins/style/plugin.min.js

The other textareas do not show up. The rendered HTML for these look like:
<textarea name="tickets_prices" id="tickets-prices" rows="5" style="visibility: hidden;"></textarea>

Of course if I disable the helper initialization these textareas are no longer invisible.

Any suggestions would be greatly appreciated!

Thank you

How to configure the plugin for the entire project?

As I read in the documentation, we should set the $config array with the settings we want.
But the question is: where we would place this piece of code?
Directly in this property declaration, inside the class? Or is there a better place to configure this helper?

TinyMCE plugin not putting tinymce scripts

I am using the plugin as it is mentioned in the documentation. Somewhere it is working fine with no issues. But in some part of my application, basically, where the methods are prefixed with admin, it is not working.

I did the usual thing like:
Controller:
$this->helpers = array('TinyMCE.TinyMCE');

View:
$this->TinyMCE->editor('simple');

But I don't know why it is not placing .js file(s) required by the tinymce, where as somewhere it is working.

also I tried putting the required script this way:-
$this->Html->script('/TinyMCE/js/tiny_mce/tiny_mce.js', array(
'inline' => false
));

OR

echo $this->Html->script('/TinyMCE/js/tiny_mce/tiny_mce.js', array(
'inline' => false
));

What should be the problem?

Documentation update

Reported by Guy Steels | March 3rd, 2011 @ 06:32 AM

It would be handy to add to the documentation of this plugin that you have to copy/clone it in a "tiny_mce" folder in the app/plugins folder. Otherwise you run into path issues. I had set it up as a git submodule in app/plugins/tinymce and it took me a while to figure out why it didn't work :)

Thanks for this great plugin btw.

not including js

echo $this->Html->script('/wysiwyg/js/tiny_mce/tiny_mce.js'); works in my layout but not in the helper. the file that is loaded by cake does not even make a cake error it makes an Apache error.

its possible this is a cake bug

i have a custom plugin dir set with app::build()

Error when saving

In CakePHP 2.6.3, I get the following error when trying to save my post in a form that uses the TinyMCE helper:

"Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'transform' at line 1"

I'm using XAMPP v1.8.3 as testing enviroment so PHP version should be 5.5.15.

Edit: Forgot to mention, the TinyMCE editor didn't load at all out of the box; I replaced it with TinyMCE 3.5.11 downloaded from tinymce.com to fix this. I don't know if this is related to my issue.

It is not possible to globally specifiy the TinyMCE version

The path to TinyMCE has a default value in TinyMCEHelper.php which is set to '/TinyMCE/js/tiny_mce/tiny_mce.js'. It is not possibly to globally override this value and specify an alternative version of TinyMCE without having to pass additional settings to the helper during construction in the controller.

It would be nice to have a global setting that can be used to specify which version is used.

TinyMCE not selecting textarea (nothing happens)

CakePHP seems to be loading the plugin because I'm not getting any errors when loading from bootstrap, including the helper in the control and then using it in the view, but nothing happens to my <textarea></textarea> tags which I placed before and after the script in the view. I have also loaded jQuery. Any ideas on what might be wrong?

Controller:
public $helpers = ['TinyMCE.TinyMCE'];

View:

<textarea></textarea>

$this->TinyMCE->editor(array('theme' => 'advanced'));

<textarea></textarea>

HTML (view source, when the page is loaded):

<textarea>
</textarea>

<script>
//<![CDATA[
tinymce.init({
script : "/TinyMCE/js/tiny_mce/tiny_mce.js",
load_script : "1",
theme : "advanced"
});
//]]>
</script>

<textarea>
</textarea>

Bootstrap:

Plugin::load('TinyMCE', ['autoload' => true]);

Configure::write('TinyMCE.configs', array(
'advanced' => array(
    'mode' => 'textareas',
    'theme' => 'advanced',
    'plugins' => 'emotions,spellchecker,advhr,insertdatetime,preview',
    'theme_advanced_buttons1' => 'newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect',
    'theme_advanced_buttons2' => 'cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor',
    'theme_advanced_buttons3' => 'insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions',
    'width' => '700',
    'theme_advanced_toolbar_location' => 'top',
    'theme_advanced_toolbar_align' => 'left',
    'theme_advanced_statusbar_location' => 'bottom',
    'theme_advanced_resizing' => 'true'
    )
  )
);

I also just noticed, when I pr($this->TinyMCE);

I get:

TinyMCE\View\Helper\TinyMCEHelper Object
(
    [helpers] => Array
        (
            [0] => Html
        )

    [theme] => 
    [plugin] => 
    [fieldset] => Array
        (
        )

    [tags] => Array
        (
        )

    [implementedEvents] => Array
        (
            [View.beforeRender] => beforeRender
        )

    [_config] => Array
        (
        )

)

For some reason there is nothing in [theme] value, it should be - advanced. What am I doing wrong? Is something wrong with this line - $this->TinyMCE->editor(array('theme' => 'advanced')); ?

What am I doing wrong? Error: TinyMCE.TinyMCEHelper could not be found

These are the steps that I am following after reading the docs. I am using Cake 3.3.x.

(1) Downloaded the master file of TinyMCE as a zip file.
(2) Extracted it to plugins/TinyMCE folder in my app. Now it has the following directory structure:

  • plugins/TinyMCE/Docs
  • plugins/TinyMCE/Test
  • plugins/TinyMCE/View
  • plugins/TinyMCE/webroot

(2) Replaced it with the 3.x branch. in the same directory
(3) Typed: $this->Html->script('/TinyMCE/js/tiny_mce4/tinymce.min.js', ['block' => true]); in the layout but doesnt load any javascript or display any error after or before I loaded jquery version 1.11.3.
(4) Since the above didn't work, I erased it and loaded the helper in the specific Controller where I wanted to use it (not the general AppController). Right after calling the class of the controller I wrote: public $helpers = ['TinyMCE.TinyMCE'];
(5) Tried loading in the view top the following: $this->TinyMCE->editor(['theme' => 'modern', 'selector' => 'textarea']); gives the above error:

Error: TinyMCE.TinyMCEHelper could not be found.
Make sure your plugin TinyMCE is in the D:\wamp\www\testingapp\plugins\ directory and was loaded.

Error: Create the class TinyMCEHelper below in file: D:\wamp\www\testingapp\plugins\TinyMCE\src\View\Helper\TinyMCEHelper.php

<?php
namespace TinyMCE\View\Helper;
use Cake\View\Helper;
class TinyMCEHelper extends Helper
{

}

I followed the path shown in the error above, and the file TinyMCEHelper.php does exists with all the code inside. I am under wamp 3.0.4. with short tags off.

What am I missing here? Please help me.

Nothing is loading - cakephp 2.3.5

Is there a way to debug this at all or to test and see why I am not getting the editor loading?

I have the following setup:

bootstrap.php
CakePlugin::load('TinyMCE');

DesignBlocksController.php
public $helpers = array('TinyMCE.TinyMCE');

DesignBlock - View add.ctp
$this->TinyMCE->editor(array('theme' => 'advanced', 'mode' => 'textareas'));

Nothing is loading at all.

I even tried adding the following into the add.ctp file but still nothing shows.
echo $this->Html->script('/TinyMCE/js/tiny_mce/tiny_mce.js', array('inline' => false));

Thanks

I checked within debug_kit and under the includes tab I am only getting two plugins loaded, not the third being TinyMCE.

The last 3 lines of my bootstrap file are:

CakePlugin::load('TinyMCE');
CakePlugin::load('DebugKit');
CakePlugin::load('Composer', array('bootstrap' => true));

TinyMCE won't load but DebugKit and Composer will.

Cannot load tiny_mce.js

I'm using cake 2.3.4. When using the plugin on my local machine (using WAMP) it works fine, however when I move my whole cake app to my intranet it fails to include the tiny_mce.js file.

I get this error in console.

GET http://intranet/knowledgebase/TinyMCE/js/tiny_mce/tiny_mce.js 500 (Internal Server Error).

The only difference is the ap is now running on intranet/knowledgebase rather than localhost/knowledgebase.

Can anyone point me in the right direction?

Thanks

Using CakeDC TinyMCE... Cannot get menu, toolbar, or the css to work

I'm using Cake 2.2.1
My bootstrap.php loads the TinyMCE
My messages_controller adds to helpers = array('TinyMCE.TinyMCE');

My Messages edit.ctp view contains:

echo $this->Form->input('message_text'); $this->TinyMCE->editor(array('selector' => "textarea#MessageMessageText", 'theme' => 'simple', 'width' => '700px', 'mode' => 'textareas', 'height'=>'300px', 'editor_selector' => 'mceSimple', 'plugins' => "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor", 'content_css' => "css/content.css", 'toolbar' => "insertfile undo redo | bold italic | alignleft aligncenter alignright | bullist numlist outdent indent | preview | forecolor backcolor emoticons" ) );

ALL of which gets me a TinyMCE box showing html markup which just happens to have

text

in it.

Where should the plugin css be located? Seems that the css/content.css is not correct... but where should I have it installed. It is currently .. \app\Plugin\TinyMCE\webroot\js\tiny_mce\themes\simple\skins\default\content.css

Now if tinymce and javascript are set up to pull the themes from here, it's not! It seems that CakePHP way would like to have the css in \Plugin\TinyMCE\webroot\css, but then the theme option would have to be specified in the css url?

I'm at a loss to get things working.

I would point out that the textarea DOES have spellchecker working... so it's very close to being right!

Thank you all in advance for any assistance
Greg

Not work cakephp 3.2

Does not work in cakephp 3.2, I cant do it working. Missing Helper all the time and I followed doc. Thanks.

TinyMCE does not work

Hello,
I followed your instructions, and it shows up in but with wrong URL -

The following part seems to be incorrect -

$this->Html->script('/tiny_mce/js/tiny_mce/tiny_mce.js', array('inline' => false));

It tries to find the js at the following location -

http://cakephplocation/tiny_mce/js/tiny_mce/tiny_mce.js

Also, how do I assign this to an actual input() field - $this->TinyMCE->editor(array('theme' => 'advanced')); ?

the form with tinymce doesn't post

I am using cakpehp 2.4.9 and I am trying to use this plugin, in the view file I can see that form is generated, with textfields beings replaced by tinymce, but the form is not submitting, I mean it doesn't do "POST". When I see in the console , I see this error


event.returnValue is deprecated. Please use the standard event.preventDefault() instead. tiny_mce.js:1
'KeyboardEvent.keyLocation' is deprecated. Please use 'KeyboardEvent.location' instead. tiny_mce.js:1
An invalid form control with name='data[Post][content]' is not focusable.


one thing to notice here is that when I don't use tinymce, the form is posting data just fine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.