Improves in emacs: - use htmx to send content to the controller - show txt and formatted_txt content in the second panel - show two tabs if "tabs" winix parameter is used - add an option to show either one or two panels - correctly resize the editor window (F11) when two panels are shown Improves in ckeditor: - use htmx to send content to the controller - do not check automatically for ckeditor update Improves in tinymce/nicedit/meta/env: - use htmx to send content to the controller while here: - change PascalCase to snake_case in meta/env controllers - update CodeMirror editor to 5.65.16 - udpate Showdown (markdown to html converter) to 2.1.0
96 lines
3.2 KiB
HTML
96 lines
3.2 KiB
HTML
|
|
<div class="uk-margin">
|
|
|
|
[if false]
|
|
[if winix_function_is "upload"]
|
|
<label class="uk-form-label" for="winix_content_id">{upload_content}</label>
|
|
[else]
|
|
[if mount_type_is "cms"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_cms}</label>[end]
|
|
[if mount_type_is "thread"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_thread}</label>[end]
|
|
[if mount_type_is "ticket"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_ticket}</label>[end]
|
|
[end]
|
|
[end]
|
|
|
|
<div class="uk-form-controls">
|
|
[# CodeMirror doesn't work correctly inside fieldset tag -- horizontal scroll is broken]
|
|
|
|
|
|
[if not [winix_function_param_is "tabs"]]
|
|
|
|
<div class="uk-flex uk-child-width-1-1" uk-height-match> [# uk-child-width-1-1 or uk-child-width-1-2 class will be added by js]
|
|
|
|
<textarea
|
|
style="height: 1000px"
|
|
class="uk-textarea"
|
|
[if request.is_item]autofocus [end]
|
|
id="winix_content_id"
|
|
rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]300[else]300[end][end]"
|
|
cols="60" name="itemcontent">[item.content.content_raw]</textarea>
|
|
|
|
<div class="uk-margin-left" id="winix_output_preview" style="display: none;">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
[else]
|
|
|
|
<ul uk-tab>
|
|
<li><a href="#">{form_emacs_content_edit}</a></li>
|
|
<li><a href="#">{form_emacs_content_preview}</a></li>
|
|
</ul>
|
|
|
|
<ul class="uk-switcher">
|
|
|
|
<li>
|
|
<textarea
|
|
style="height: 1000px"
|
|
class="uk-textarea"
|
|
[if request.is_item]autofocus [end]
|
|
id="winix_content_id"
|
|
rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]300[else]300[end][end]"
|
|
cols="60" name="itemcontent">[item.content.content_raw]</textarea>
|
|
</li>
|
|
|
|
<li>
|
|
<div id="winix_output_preview">
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
[end]
|
|
|
|
<input type="hidden" id="winix_content_parsed_id" value="" name="itemcontent_parsed">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="winix_contenttype_id">{form_emacs_content_type}</label>
|
|
<select class="uk-select" name="contenttype" id="winix_contenttype_id">
|
|
<option[if item.content.type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
|
|
<option[if item.content.type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
|
|
[if user_can_use_html]<option[if item.content.type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
|
|
[if user_can_use_html]<option[if item.content.type_is "markdown"] selected[end] value="5">{form_emacs_content_type_markdown}</option>[end]
|
|
[if user_can_use_other]<option[if item.content.type_is "other"] selected[end] value="4">{form_emacs_content_type_other}</option>[end]
|
|
</select>
|
|
|
|
[if false]
|
|
[if user_can_use_bbcode]<option[if item.content.type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
|
|
[end]
|
|
</div>
|
|
|
|
|
|
[if not [winix_function_param_is "tabs"]]
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="winix_viewtype_id">{form_emacs_view_type}</label>
|
|
<select class="uk-select" id="winix_viewtype_id">
|
|
<option value="1" selected>{form_emacs_view_type_one_panel}</option>
|
|
<option value="2">{form_emacs_view_type_two_panels}</option>
|
|
</select>
|
|
</div>
|
|
[end]
|
|
|
|
|
|
|