Copy of text in browse only form

Questions related to using nuBuilder Forte.

Copy of text in browse only form

Unread postby sputs » Sun Jul 11, 2021 7:51 pm

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.
sputs
 
Posts: 22
Joined: Mon Feb 08, 2021 4:37 am

Re: Copy of text in browse only form

Unread postby kev1n » Sun Jul 11, 2021 10:32 pm

Add this JavaScript in your form's Custom Code:

Code: Select all
$("DIV[id^='nucell']").css({userSelect: 'text'});
kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Copy of text in browse only form

Unread postby sputs » Mon Jul 12, 2021 12:53 am

Hi Kevin,

If I enter the whole string it gives an error.
sputs
 
Posts: 22
Joined: Mon Feb 08, 2021 4:37 am

Re: Copy of text in browse only form

Unread postby kev1n » Mon Jul 12, 2021 2:05 am

What error?
kev1n
nuBuilder Team
 
Posts: 2012
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Copy of text in browse only form

Unread postby sputs » Mon Jul 12, 2021 2:53 am

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: 22
Joined: Mon Feb 08, 2021 4:37 am

Re: Copy of text in browse only form

Unread postby sputs » Tue Jul 13, 2021 10:04 pm

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'});
sputs
 
Posts: 22
Joined: Mon Feb 08, 2021 4:37 am


Return to General

Who is online

Users browsing this forum: No registered users and 13 guests

cron