Layui Division Method for Different Welfine Editor and TextArea Value

1. Evil text editor transmission value to Textarea

 Information content  
Note: Textarea Adds Lay-Verify Attribute

Layui.Use ([‘Form’, ‘Layedit’], Function () {Var form = layui.form, layer = layui.Layer, $ = layui.jquery, var letyedit = layui.layedit; // creation editor index = layedit.build (‘demo’, {Tool: [‘strong’ / / Bold, ‘italic’ // i 体, ‘underline’ // Underline, ‘del’ // Delete line, ‘|’ // divided line, ‘left’ // left alignment, ‘center’ // is aligned, ‘right’ // right alignment, ‘link’ // hyperlink, ‘unlink’ // Clear Link, ‘Face’ // Expression]}); // Establish Editor // Custom Verification Rule Form.Verify ({ Content: function () {layEdit.Sync (index);}});})

  Create richThis editor, custom verification rule here to synchronize index  
, you can synchronize the rich text editor to TextArea

2. Synchronize the value of TextArea to the Layui rich text editor

Layedit.SetContent (Index, $ Str);

Index still still created variable name when creating
 $ STR It is a data from the background through Ajax (  The mutual transmission method of the Layui rich text editor and TextArea value is that Xiaobian shared it to everyone, I hope I can give you a reference, I hope everyone Support TUMI clouds. 
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment