Revision 9fcb99db
Von Sven Schöling vor mehr als 1 Jahr hinzugefügt
| SL/Controller/Test.pm | ||
|---|---|---|
|   $self->render(\$output, { type => 'text' });
 | ||
| }
 | ||
|  | ||
| sub action_ckeditor_test_page {
 | ||
|   my ($self) = @_;
 | ||
|  | ||
|   $self->render("test/ckeditor");
 | ||
| }
 | ||
|  | ||
| 1;
 | ||
| menus/user/00-erp.yaml | ||
|---|---|---|
|   order: 400
 | ||
|   params:
 | ||
|     action: Project/test_page
 | ||
| - parent: develop
 | ||
|   id: ckeditor_test
 | ||
|   name: CKEditor5 Test
 | ||
|   access: developer
 | ||
|   order: 450
 | ||
|   params:
 | ||
|     action: Test/ckeditor_test_page
 | ||
| - parent: develop
 | ||
|   id: js_tests
 | ||
|   name: JS Tests
 | ||
| templates/webpages/test/ckeditor.html | ||
|---|---|---|
| [% USE P %]
 | ||
|  | ||
| <h1>CKeditor</h1>
 | ||
|  | ||
| <h3>standard empty</h3>
 | ||
|  | ||
| [% P.textarea_tag('name1', "", class="texteditor") %]
 | ||
|  | ||
| <h3>prefilled</h3>
 | ||
|  | ||
| [% P.textarea_tag('name2', "<p>this is a text</p>", class="texteditor") %]
 | ||
|  | ||
| <h3>inside form (check if enter triggers form.submit)</h3>
 | ||
|  | ||
| <fieldset>
 | ||
| <form onsubmit="return alert('Submit was triggered');">
 | ||
| [% P.textarea_tag('name3', "<p>Try to hit enter here</p>", class="texteditor") %]
 | ||
| [% P.input_tag('name4', 'and here...') %]
 | ||
| </form>
 | ||
| </fieldset>
 | ||
|  | ||
| <h3>initial focus</h3>
 | ||
|  | ||
| [% P.textarea_tag('name4', "<p>this is a text</p>", class="texteditor texteditor-autofocus") %]
 | ||
|  | ||
| <h3>with custom width/height</h3>
 | ||
|  | ||
| [% P.textarea_tag('name5', "<p>this is a text</p>", style="width: 350px; height: 150px", class="texteditor") %]
 | ||
Auch abrufbar als: Unified diff
ckeditor5: test page für developer Rechte