Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Ace editor on tablet

Questions related to using nuBuilder Forte.
Post Reply
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Ace editor on tablet

Unread post by Timo »

Two questions:
1. How to launch the Ace code editor on a tablet? There is no double-click event.
2. It's almost impossible to view and edit scripts because of the small size. I 'd like the <textarea> element automatically expand vertically as text is entered.
https://stephanwagner.me/auto-resizing-textarea
ipad.png
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: Ace editor on tablet

Unread post by admin »

Timo,

nuBuilder development has not been created to be used on an iPad.

Steven
Timo
Posts: 221
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Ace editor on tablet

Unread post by Timo »

All in all, it works well. All in all, it works well. All it takes is an additional button to open the editor without double-clicking.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Ace editor on tablet

Unread post by toms »

Hi,

This will allow you to open the ACE editor for some (most frequently used) JavaScript and php editors.

Usage: Clicking the "JS", "PHP" etc. icons will open up the ACE editor.
ace.gif
Add under Setup -> Header:

Code: Select all

    
function nuOnLoad() {

    var f = nuCurrentProperties();

    if (nuFormType() == 'edit' && f.form_id == 'nuform') {

        $("#icon.nuHtml").click(function() {
            nuOpenAce('Javascript', 'sfo_javascript');
        });

    }

    if (f.form_id == 'nuphp') {

        $("#icon.nuHtml").click(function() {
            nuOpenAce('PHP', 'sph_php');
        });

    }

    if (f.form_id == 'nusetup') {

        $("#label_set_header").click(function() {
            nuOpenAce('HTML', 'set_header');
        });

    }
}
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: Ace editor on tablet

Unread post by admin »

.
Post Reply