NetTalk Central

Author Topic: NT 7.02, Redactor and TinyMCE  (Read 3086 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
NT 7.02, Redactor and TinyMCE
« on: December 26, 2012, 01:25:41 PM »
Bruce,

     Finally had a chance to test NT 7.02 and redactor/TinyMCE.  I have two tabs on a pop up form.  One has TinyMCE, the other has Redactor.

     The problem still remains with TinyMCE:  we can only add data to the control the first time accessed.  Any subsequent editing is not saved.
 
     Redactor takes a bit of tweeking to get it to work.  As per one of your previous posts, I had to turn off combine/compress and delete various .gz files.  I now have it working, but as another user posted, there is no vertical scroll bar, so this is an issue.  I'll check the Redactor web site to see if there is a way to turn this on with our current implementation.

     So now, we have two HTML editors that only work partially.  I have tested in IE 9 and 10, FireFox 17.x.x and Chrome, with the same results.  Another user posted that this may be due to the pop-up scenario.  Apparently this user had TinyMCE in a non-PopUp mode and it worked.  Have you been able to determine the problem?

Thanks,

Jeff

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: NT 7.02, Redactor and TinyMCE
« Reply #1 on: December 26, 2012, 07:44:05 PM »
Bruce,

     Looking at the Redactor web site, they show an example of a "Dynamic text area", using the following script:


1.<div id="testdynamic"></div>
2.
3.<script type="text/javascript">
4.$(function()
5.{
6.    var textarea = $('<textarea style="height: 200px;">');
7.    $('#testdynamic').append(textarea);
8.    $(textarea).redactor({
9.        focus: true,
10.        autoresize: false,
11.        callback: function(obj)
12.        {
13.            obj.setCode("<h3>It works!</h3><p>Lorem ipsum…</p>");
14.        }
15.    });
16.});
17.</script>

     They also show a setting in the docs called Autoresize, with sample code:

                             $('#redactor').redactor({ autoresize: false });


     Perhaps one or both of these could be used to modify Redactor so that it has a vertical scrollbar, but I don't know how to go about using these scripts.  Can you help?

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: NT 7.02, Redactor and TinyMCE
« Reply #2 on: December 27, 2012, 01:00:17 AM »
Hi Jeff,

>> Perhaps one or both of these could be used to modify Redactor so that it has a vertical scrollbar, but I don't know how to go about using these scripts.

Redactor is a jQuery widget, meaning that it's trivial for you to apply any setting that the widget offers. In this case I'll add this as a template option anyway, but it's trivial for you to do by hand (and a great way to learn, because all the widgets have lots of options not specifically covered in the templates.

Right click on the procedure in the tree and select "source".
Search for Redactor.
you'll see a line;

  packet = p_web.RedactorInit('MAI:AutoResponseText',,loc:options)

before that is an embed point where you can set loc:options. In this case;

  loc:options =  'autoresize: false'

I am investigating the issue with the script minimization and compression. That should be sorted in 7.03. I haven't investigated the TinyMCE issue yet.


Cheers
Bruce



kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: NT 7.02, Redactor and TinyMCE
« Reply #3 on: December 27, 2012, 11:43:03 AM »
Bruce,

     Thanks!  That worked, I now have a vertical scroll bar in the redactor editor.  I'll continue experimenting with other options.

     I've experimented with both TinyMCE and Redactor, side by side in my app all day today.  There are still issues in both.  For example, as we have seen for a while now, TinyMCE will only allow one edit, subsequent edits fail to save any data.  Redactor does save all edits.  Initially, with NT 7, this seemed to only be an issue with pop-up forms and IE 9.  It now happens with FireFox as well, using NT 7.02.
     Niether editor will allow me to add images or horizontal lines.  If I do, upon trying to open the form, it halts, giving just a blank form with the word change in the title bar.
     I have been able to add tables and bulleted/ordered lists in both editors.  But, it seems nothing else can be added to the editor.  I have experienced this with both pop-up and non pop-up forms, with IE 9 and FireFox.

Thanks,

Jeff