You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
  Monday, 06 September 2021
  12 Replies
  1.3K Visits
I would like to use the JCE pro in a form to replace the textarea.

Any idea how to do that?
more than a month ago
·
#108766
I would suggest either using the Editor Field to create the textarea and initialise the editor, or the standard Joomla API call, eg:


$editor = JFactory::getConfig()->get('editor');

$instance = JEditor::getInstance($editor);
$instance->display('my_content', $content, 500, '100%', 20, 20);

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108789
Ryan,

thanks for your suggestion but as a kind of novice without extensive knowledge in php I need some more details on where in the php or html to place this code.

In my scenario the visitor of our website opens a page with a form. The form contains a textarea and I want this textarea to be replaced with the editor so the client can add formatted text and paste screenshots.

My html looks like this:
<textarea cols="80" rows="12" name="memo" id="txa01" style="width: auto"></textarea>
more than a month ago
·
#108794
In my scenario the visitor of our website opens a page with a form. The form contains a textarea and I want this textarea to be replaced with the editor so the client can add formatted text and paste screenshots.


How are you creating the form? Is it form HTML added directly to an article?

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108797
Yes it is within an article. I have some php in {source} tags and html
more than a month ago
·
#108799
I've created a Joomla plugin to facilitate this - https://github.com/widgetfactory/wf-editor-from-textarea

Once installed and enabled, set the Editor Selector in the plugin parameters as a class value that is assigned to the textarea, eg: for the textarea below, the Editor Selector will be custom-editor.


<textarea cols="80" rows="12" name="memo" id="txa01" style="width: auto" class="custom-editor"></textarea>


When the page loads, the textarea will be converted into the default or user assigned Joomla Editor, ie: Tinymce or JCE.

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108821
Thanks a lot for the plugin. Unfortunately I cannot get it working. I installed the plugin:

{A3A8E16C-40BB-46A2-9438-4E644F69C5B3}.png

I activated it:

{D9666C16-AE2A-465F-83DF-515D6ECE1812}.png

{C3F97D22-5283-4180-AE72-6BE42906BF2B}.png

and I changed my code:

<tr>
<td>Memo:</td>
<td colspan="3" ><textarea cols="80" rows="12" name="memo" id="txa1" style="width: auto" class="wysiwyg-editor"></textarea></td>
</tr>

But the result is still a standard <textarea>

What am I doing wrong?
more than a month ago
·
#108873
Is this textarea created for all users or only logged in users?

Is JCE assigned as the default editor in the Joomla Global Configuration?

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108884
I do have JCE selected in System - Configuration - Standard Editor.
The <textarea> is used for logged in and not logged in users.
more than a month ago
·
#108899

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108919
This was just an issue with plugin ordering. The Editor from Textarea plugin needed to be ordered after the Sourcerer plugin, so that the content was generated first, before the Editor from Textarea was activated.

It is fixed and appears to be working OK on your site.

Just because you're not paranoid doesn't mean everybody isn't out to get you.

more than a month ago
·
#108922
Good morning Ryan,

it works fine when being logged in as admin-user. But unfortunately it does not work when being logged in as normal user. I have created another username for you, so you can check.

Thanks
Florian
more than a month ago
·
#108924
it works fine when being logged in as admin-user. But unfortunately it does not work when being logged in as normal user.


You need an editor profile that is assigned to this user group. The only editor profile that you currently have assigned to a usergroup is assigned to the Super User, which is why you don't see an editor loaded for a "normal user".

Just because you're not paranoid doesn't mean everybody isn't out to get you.

  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!