How to get value from fckeditor?

asked 2015-08-27 03:45:21 +0800

stanley1991 gravatar image stanley1991 flag of China
11 2

updated 2015-09-01 01:16:52 +0800

Hello guys,I use fckeditor in ZUL just as following:

<?xml version="1.0" encoding="UTF-8"?>
<window apply="org.zkoss.bind.BindComposer"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd" 
viewModel="@id('win') @init('org.zkforge.petshop.controller.SellerModel')">

<include src="banner.zul" height="20%"/>
<div align="center">
    <div id="pane1" width="650px" align="left" visible="@bind(win.flagShowPanel)">
                <column width="250px"/>
                <row spans="2"><div align="center"><label style="font-weight:bold;" value="宠物信息"/></div></row>
                    <listbox mold="select" rows="1" model="@bind(win.products)" selectedItem="@bind(win.product)" emptyMessage="No product found!">
                        <template name="model">
                                <listcell label="@bind(each.name)"></listcell>
                    <textbox id="petName" value="@bind(win.item.name)"/>
                        <fckeditor id="desc" customConfigurationsPath="/seller.js" 
                        toolbarSet="seller" height="100px" value="@bind(win.item.description)"/>
                    <decimalbox id="price" format="##,##0.00" value="@bind(win.item.price)"/>
                        <button id="imageBtn" label="上传" onUpload="@command('upload',upevent=event)" upload="true"/>
                    <image id="picture" width="100px" height="77px" onClick="@command('showImage')" style="cursor:pointer" content="@bind(win.picture)"/>
        <label style="font-size:xx-small" value="Required fields are designated by a *"/>
        <div align="right">
            <button label="Next >>" onClick="@command('next')"/>

    <div id="pane2" width="650px" align="left" visible="@bind(!win.flagShowPanel)">
                <column width="250px"/>
                <row spans="2"><div align="center"><label style="font-weight:bold;" value="Information about yourself"/></div></row>
                    <textbox id="firstName" value="@save(win.item.contactInfo.firstName)"/>
                    <textbox id="lastName" value="@save(win.item.contactInfo.lastName)"/>
                    <textbox id="email" value="@save(win.item.contactInfo.email)"/>
                    <textbox id="street" cols="50" value="@save(win.item.address.street1)"/>
                    <textbox id="city" value="@save(win.item.address.city)"/>
                    <textbox id="state" value="@save(win.item.address.state)"/>
                    <captcha id="captcha" length="4" noise="true"/>
                    <textbox id="verify" maxlength="4" value="@bind(win.verify)" />
                    <button onClick="captcha.randomValue()" label="点击刷新"/>
        <label style="font-size:xx-small" value="标记  *  元素必填。"/>
        <div align="right">
            <button label="<< Previous" onClick="@command('prev')"/>
            <button label="Submit" onClick="@command('submit')"/>
delete flag offensive retag edit


Where comes the win from? Is this a reference or your viewmodel?

chillworld ( 2015-08-27 06:33:50 +0800 )edit

I bind the value of zul and model with annotations in MVVM pattern.The 'win' is the id of current page just like this : viewModel="@id('win') @init('org.zkforge.petshop.controller.SellerModel')

stanley1991 ( 2015-08-27 06:53:10 +0800 )edit

possible to edit your question and put the whole zul there?

chillworld ( 2015-08-27 09:16:06 +0800 )edit

Dear chillworld,I often see you in this community. As a newcomer of ZK framework,I need to learn much for job. Do you have facebook or anyother social communication account? If possible,I want to make a friend with you so that we can discuss ZK problems more often and improve my poor English. ^-^

stanley1991 ( 2015-08-27 09:57:08 +0800 )edit

see mine profile :)

chillworld ( 2015-08-27 11:15:14 +0800 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-08-28 06:08:53 +0800

cor3000 gravatar image cor3000
5399 2 7
ZK Team

updated 2015-08-28 06:09:24 +0800

just to add a solution from the otherwise initially hidden comments:

using the latest version helped

the latest versions are available

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-08-27 03:45:21 +0800

Seen: 47 times

Last updated: Sep 01 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More