added basic support for htmx (ajax)
- if there is HX-Request header present we sent only a part of the whole html - we return only specific stream defined by [out ...] ezc statement - the name of the stream is passed in the 'frame' parameter (if not present then 'content' is assumed) - added ezc function: winix_is_htmx_request
This commit is contained in:
@@ -3,13 +3,17 @@
|
||||
|
||||
[# blocks are not connected with languages yet, so don't use \{ but {]
|
||||
|
||||
|
||||
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
{
|
||||
CKEDITOR.tools.enableHtml5Elements( document );
|
||||
function winix_ckeditor_old_browser_support() {
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
{
|
||||
CKEDITOR.tools.enableHtml5Elements( document );
|
||||
}
|
||||
}
|
||||
|
||||
[if not winix_is_htmx_request]
|
||||
winix_ckeditor_old_browser_support();
|
||||
[end]
|
||||
|
||||
</script>
|
||||
[end]
|
||||
|
||||
@@ -22,6 +26,7 @@ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
[block ckeditor]
|
||||
<script>
|
||||
|
||||
function winix_ckeditor_initialize() {
|
||||
|
||||
var editorElement = CKEDITOR.document.getById( '[0]' );
|
||||
editorElement.setAttribute( 'contenteditable', 'true' );
|
||||
@@ -83,6 +88,13 @@ extraAllowedContent : 'aside caption figure figcaption article footer header sec
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
[if not winix_is_htmx_request]
|
||||
winix_ckeditor_initialize();
|
||||
[end]
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user