remove the nuReadonly class from a nuHTML

Questions related to customising nuBuilder Forte with Javascript or PHP.

remove the nuReadonly class from a nuHTML

Unread postby vanman » Tue Nov 17, 2020 9:10 pm

hi

Is it possible to remove the nuReadonly class from a nuHTML field so the user can copy to the clipboard text from the HTML field. I still want it so then fileds cannot be edited.

Thanks

Paul
vanman
 
Posts: 29
Joined: Fri Mar 02, 2018 7:39 am

Re: remove the nuReadonly class from a nuHTML

Unread postby kev1n » Wed Nov 18, 2020 6:41 pm

In JS, like this?
Code: Select all
$("#your_html_id").removeClass( "nuReadonly " )
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1357
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: remove the nuReadonly class from a nuHTML

Unread postby vanman » Mon Nov 23, 2020 8:39 pm

kev1n wrote:In JS, like this?
Code: Select all
$("#your_html_id").removeClass( "nuReadonly " )


Hi Kevin

Tried that

tried different things

Thought of is I double clicked it and was put in a different input like a Text Area and then dblclick again and it would return to nuHtml

What do you think?

Paul
vanman
 
Posts: 29
Joined: Fri Mar 02, 2018 7:39 am

Re: remove the nuReadonly class from a nuHTML

Unread postby kev1n » Mon Nov 23, 2020 9:13 pm

Try this:
Code: Select all
$('#your_html_id').css('user-select','text');
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1357
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: remove the nuReadonly class from a nuHTML

Unread postby vanman » Mon Nov 23, 2020 9:45 pm

Hi Kevin

Thanks that worked just right

Paul
vanman
 
Posts: 29
Joined: Fri Mar 02, 2018 7:39 am

Re: remove the nuReadonly class from a nuHTML

Unread postby admin » Wed Dec 09, 2020 5:29 am

.
admin
Site Admin
 
Posts: 3406
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 3 guests