wysiwyg editor textarea not showing

tfmvdbroek 05 Mar, 2015
Hi,

I am trying to make a simple article submission form. I can get it to work with a simple title and text-area.
But i want the text-area to be a rich field with a wysiwyg editor. Therefore i selected WYSIWYG editor: Yes in the textarea options. But when i check the form it still shows me a normal textarea with no editor ..

This is the form code:

<div class="form-group gcore-form-row" id="form-row-submit_button"><div class="gcore-input gcore-display-table" id="fin-submit_button"><input name="submit_button" id="submit_button" type="submit" value="Submit" class="btn btn-default form-control A" style="" data-load-state="" /></div></div><div class="form-group gcore-form-row" id="form-row-title"><label for="title" class="control-label gcore-label-left">Title</label>
<div class="gcore-input gcore-display-table" id="fin-title"><input name="Title" id="title" value="" placeholder="" maxlength="" size="50" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-content"><label for="content" class="control-label gcore-label-left">Content</label>
<div class="gcore-input gcore-display-table" id="fin-content"><textarea name="Content" id="content" placeholder="" rows="3" cols="40" class="form-control A" title="" style="" data-wysiwyg="1" data-load-state="" data-tooltip=""></textarea></div></div>
GreyHead 05 Mar, 2015
Hi tfmvdbroek,

This sounds as though there may be a JavaScript error on the page. Do you see anything reported in the console?

Bob
tfmvdbroek 05 Mar, 2015
I get this error:

Using getAttributeNode () is no longer supported. Instead, use getAttribute (). mootools - core.js : 108: 0
TypeError: container is null md_stylechanger.js : 61: 1
ReferenceError : tinymce is not defined form: 115: 46
Using getPreventDefault () is no longer supported. Instead defaultPrevented .
GreyHead 06 Mar, 2015
Hi tfmvdbroek,

This is the problem "tinymce is not defined"

Please check the page source to see if it being loaded at all. If it is then there may be a timing problem.

Bob
Max_admin 07 Mar, 2015
Please try to fix this first JS error about mootools and that may solve the 2nd one, I have just tested the wysiwyg editor and it works fine!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 09 Mar, 2015
I tried updating mootools but this does not seem to fix the warning nor the editor.
TinyMCE seems to be loaded in the source code:

<script type="text/javascript">jQuery(document).ready(function($){
				$('*[data-wysiwyg="1"]').each(function(){ tinymce.init({"selector":"#"+$(this).attr("id")}); });


Can we set another editor to test it with? Or do you guys have any clue how to fix this?
Max_admin 09 Mar, 2015
I need a link to the form to test this, please post it here or using the PM
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 10 Mar, 2015
It is now running on a local only site. I will make an online copy and then come back to you.
Max_admin 10 Mar, 2015
Ok, you can also try testing using the "View form" link in the Chronoforms admin, add this to the link:
&tmpl=component


Check if this makes it work ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 10 Mar, 2015
Only error it gives me then is: ReferenceError: tinymce is not defined. Mootools warnings are no longer there.
Still no editor tho ...
Max_admin 10 Mar, 2015
Then for some reason the tinymce file is not loaded, do you have any system plugins installed which do any control on the loaded files ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 11 Mar, 2015
Not that i can find. Would it be possible to use JCE instead of tinymce?
I found this snippet on your forums:

<div class="form_element cf_textarea">
<label class="cf_label">Details</label>
<br/>
<?php echo $editor->display( 'Details',  '' , '100%', '350', '75', '20', false ) ; ?>
</div>


Pasting this in a custom code loads the editor with a different text field. But how do i use this in the article content field?
tfmvdbroek 11 Mar, 2015
Sorry, This is the code i ment:


<?php
$editor =& JFactory::getEditor();
echo $editor->display( 'text_1', '{text_1}', '80%', '200', '75', '10', false); 
?>
Max_admin 12 Mar, 2015
The built in editor should work, but its only tinyMCE.

Your code should also work, the 2nd parameter sets the editor value, you can try to load it from the data array directly:

<?php
$editor = JFactory::getEditor();
echo $editor->display( 'text_1', $form->data("text_1"), '80%', '200', '75', '10', false); 
?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 12 Mar, 2015
The default editor (JCE) shows up now🙂 Thanks for that already.
Only problem now is that it does not put the text in the 'Joomla Artile' Action. I have set the Full text field name to: text_1 but it does not seem to use the input and fills in empty content.
Max_admin 13 Mar, 2015
Please try a "debugger" action before the Joomla article action and check if the data is passed correctly ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tfmvdbroek 16 Mar, 2015
Second data array seems to be empty?:

Data Array

Array
(
    [option] => com_chronoforms5
    [chronoform] => News
    [event] => submit
    [submit_button] => Submit
    [Title] => 11111111111111111
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
)
Max_admin 16 Mar, 2015
There is no "text_1" in the data array which means that the field doesn't exist, please post a link to your form ? here or by PM
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.