EasyUI Forum
February 23, 2018, 05:31:33 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Extension texteditor in form  (Read 341 times)
fgendorf
Newbie
*
Posts: 12


View Profile Email
« on: November 14, 2017, 10:07:33 AM »

Hi, is that possible load content in texteditor extension by .form('load',DATA); ?

Thanks for advance
« Last Edit: November 16, 2017, 08:38:00 AM by fgendorf » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3204


View Profile Email
« Reply #1 on: November 15, 2017, 08:22:36 PM »

You have to call 'setValue' method to load the texteditor's data.
Code:
$('#te').texteditor('setValue', data);
Logged
fgendorf
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: November 16, 2017, 03:13:24 AM »

Thanks for answer, I know that to put a value in a texteditor I must use setValue, but when a texteditor is inside a form, and DATA is a json with all fields from form, the method .form('load',DATA) fulfill all fields but not fields with texteditor.
Logged
proceno72
Newbie
*
Posts: 29



View Profile
« Reply #3 on: November 16, 2017, 07:15:10 AM »

Thanks for answer, I know that to put a value in a texteditor I must use setValue, but when a texteditor is inside a form, and DATA is a json with all fields from form, the method .form('load',DATA) fulfill all fields but not fields with texteditor.

When you define your form, you could automatically call setValue on load success event. Like this:
Code:
$('#myform').form({
        onLoadSuccess: function (data) {
                $('#te').texteditor('setValue',data.fieldName);
        }
});
Logged
fgendorf
Newbie
*
Posts: 12


View Profile Email
« Reply #4 on: November 16, 2017, 07:35:11 AM »

Thank you! Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!