|
Processing... Edit the content, then press Save to see a live preview.
Description & Source Code
Keikai Doc PE is a lightweight rich text editor component. It provides essential text editing capabilities and HTML content manipulation. This component enables Java developers to efficiently implement rich text editing functionality in their web applications, with comprehensive support for text formatting, tables, lists, and other standard editing features. It also offers a smooth upgrade path to the full-featured Keikai Doc EE, making it easy to scale up when more advanced capabilities are needed. keikai_doc.zul
<zk> <style> .doc { border-width: 1px; border-style: solid; border-color: rgb(217, 217, 217); border-image: initial; } .contentArea { height: 750px; } .doc-btn { padding: 10px; font-size: 15px; } </style> <div sclass="docDemo"> <div sclass="contentArea"> <attribute name="onDoubleClick"><![CDATA[ if(doc.readonly) { saveBtn.visible=true; editBtn.visible=false; doc.readonly=false; doc.customConfigurationsPath=docConfig.getSelectedItem().getValue(); } ]]></attribute> <document id="doc" class="doc" height="100%"> <attribute name="value"><![CDATA[ <h2>Meeting Notes: Product Development</h2> <p><b>Date:</b> May 16, 2024</p> <img src="https://www.zkoss.org/resource/img/price/Features.svg"/> <h3>Key Decisions</h3> <p style="text-align:justify">The team has agreed to focus on delivering the core functionality first, with additional features to be developed in future releases. <span style="color:red">Deadline for MVP is September 18th</span>.</p> <blockquote>Note: All teams must submit their resource requirements by next Friday.</blockquote> <h3>Action Items</h3> <table border="1" style="width:100%"> <tr> <th>Task</th> <th>Assigned To</th> <th>Due Date</th> </tr> <tr> <td>Finalize UI mockups</td> <td>Design Team</td> <td>June 22</td> </tr> <tr> <td>Complete API documentation</td> <td>Development Team</td> <td><span style="background-color:yellow">July 30</span></td> </tr> <tr> <td>Prepare marketing materials</td> <td>Marketing Team</td> <td>August 15</td> </tr> </table> <h3>Next Steps</h3> <ol> <li>Weekly status updates via email</li> <li>Follow-up meeting scheduled for <u>January 29th</u></li> <li>Share meeting notes with <a href="mailto:stakeholders@example.com">all stakeholders</a></li> </ol> <br> ]]></attribute> </document> </div> <div style="display: flex;flex-direction: row-reverse; margin-top:20px"> <button id="saveBtn" label="Save" class="doc-btn"> <attribute name="onClick"><![CDATA[ editBtn.visible = true; saveBtn.visible = false; doc.readonly = true; doc.customConfigurationsPath = "/widgets/input/keikai_doc/EmptyToolBar.json"; ]]></attribute> </button> <button id="editBtn" label="Edit" visible="false" class="doc-btn"> <attribute name="onClick"><![CDATA[ saveBtn.visible=true; editBtn.visible=false; doc.readonly=false; doc.customConfigurationsPath=docConfig.getSelectedItem().getValue(); ]]></attribute> </button> </div> </div> </zk> keikai_doc_ctrl.zul
<zk> <groupbox closable="false" sclass="z-demo-config"> <caption>Toolbar</caption> <radiogroup id="docConfig"> <attribute name="onCheck"><![CDATA[ doc.setCustomConfigurationsPath(self.getSelectedItem().getValue()); saveBtn.visible=true; editBtn.visible=false; doc.readonly=false; ]]></attribute> <vlayout> <radio label="Default ToolBar" checked="true"/> <radio label="Simple ToolBar" value="/widgets/input/keikai_doc/SimpleToolBar.json"/> <radio label="Multi ToolBar" value="/widgets/input/keikai_doc/MultiToolBar.json" /> </vlayout> </radiogroup> </groupbox> </zk> SimpleToolBar.json
{ "toolbar": [["Undo", "Redo", "-", "Bold", "Italic", "Underline", "Strike", "Subscript", "Superscript"]] } MultiToolBar.json
{ "toolbar": [ ["Bold", "Italic", "Underline", "Strike", "Subscript", "Superscript"], ["FontSize", "FontColor", "FontBackgroundColor"], ["NumberedList", "BulletedList", "Outdent", "Indent"], ["Link"], ["Image", "Table", "HorizontalRule"], ["Undo", "Redo"] ] }
Copyright © 2005-2025 Potix Corporation All rights reserved.
|
Processing... |