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.

Copy of text in browse only form

Questions related to using nuBuilder Forte.
Post Reply
sputs
Posts: 27
Joined: Sun Feb 07, 2021 8:07 pm

Copy of text in browse only form

Unread post by sputs »

Hi,

Is there a way to make text selectable in a browse only form to copy paste (to google translate), without having it open the edit view. Don't need the edit view.
kev1n
nuBuilder Team
Posts: 4565
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: Copy of text in browse only form

Unread post by kev1n »

Add this JavaScript in your form's Custom Code:

Code: Select all

 $("DIV[id^='nucell']").css({userSelect: 'text'});
sputs
Posts: 27
Joined: Sun Feb 07, 2021 8:07 pm

Re: Copy of text in browse only form

Unread post by sputs »

Hi Kevin,

If I enter the whole string it gives an error.
kev1n
nuBuilder Team
Posts: 4565
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: Copy of text in browse only form

Unread post by kev1n »

What error?
sputs
Posts: 27
Joined: Sun Feb 07, 2021 8:07 pm

Re: Copy of text in browse only form

Unread post by sputs »

It's still not allowing me to select and copy the text.

Code: Select all

<div id="nucell_0_1" data-nu-row="0" data-nu-column="1" class="nuCellEven nuBrowseBorderTop nuBrowseTable" style="text-align: left; overflow: hidden; width: 930px; top: 27px; left: 179px; height: 20px; position: absolute; user-select: text;" data-nu-primary-key="1414035670998396928" onclick="nuSelectBrowse(event, this)">@Neobaianismo vamos fazer uma nova epidemia da dengue na argentina</div>

<div id="nucell_1_1" data-nu-row="1" data-nu-column="1" class="nuCellOdd nuBrowseTable" style="text-align: left; overflow: hidden; width: 930px; top: 54px; left: 179px; height: 20px; position: absolute; user-select: text;" data-nu-primary-key="1414063227034558466" onclick="nuSelectBrowse(event, this)">Já é a 7x seguida q eu vejo o vídeo do pânico botando dengue na Argentina</div>
Modsec gave an error. Disabled it to enter the JS.
sputs
Posts: 27
Joined: Sun Feb 07, 2021 8:07 pm

Re: Copy of text in browse only form

Unread post by sputs »

Issue solved.

JS Code from Kevin to place into 'Cuscom Code' of the form:

Code: Select all

function nuSelectBrowse() {
}

$("DIV[id^='nucell']").css({userSelect: 'text'});
Post Reply