NetTalk Central

Author Topic: How to get the value from an editor field (TinyMCE)  (Read 3869 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 430
    • View Profile
    • Email
How to get the value from an editor field (TinyMCE)
« on: May 19, 2014, 06:05:43 AM »
Hi Bruce

I have a form with a text field (TinyMCE) and a button. I want to some stuff with the text when i Press the button. But how do I update the session var before i press the button?

NT8.11

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: How to get the value from an editor field (TinyMCE)
« Reply #1 on: May 19, 2014, 09:52:23 PM »
Hi Niels,

hmm. I think you need to explain a bit more. What's currently happening and where are you getting stuck?

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 430
    • View Profile
    • Email
Re: How to get the value from an editor field (TinyMCE)
« Reply #2 on: May 20, 2014, 09:15:00 AM »
Nothing  ;)

I have this simple form with a text field as TinyMCE and a button.
When i press the button I would like to have the value from the text field in the session var. But it's empty.
If I save the form and edit again it's there.

The point is that I want to enter some codes into the text field and when i press my update button I want these codes to be changed into some text and returned to the text field.

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 430
    • View Profile
    • Email
Re: How to get the value from an editor field (TinyMCE)
« Reply #3 on: May 26, 2014, 03:02:23 AM »
I have added a test app. In the form enter some text. Next press the button below and see the message. It's empty. How do I get the text from the text box?

/Niels

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: How to get the value from an editor field (TinyMCE)
« Reply #4 on: May 26, 2014, 05:24:28 AM »
I have tweaked the 8.13 build so that the contents of the text box are included in what is passed with the button click.
In other words you will be able to access p_web.GetValue(FieldEquate) to get the current value of the Text control.

Cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 430
    • View Profile
    • Email
Re: How to get the value from an editor field (TinyMCE)
« Reply #5 on: May 26, 2014, 10:45:49 AM »
Awesome.
Thanks!!