From 743a88c29bf51fe554229ac3b14da1f6f58afb1e Mon Sep 17 00:00:00 2001 From: Hakim Zulkufli Date: Sun, 30 Apr 2017 19:50:32 +0800 Subject: [PATCH] Changed content input from textarea into div. This is to ensure that the area will be comaptible with any text editor plugins. I have tested with SimpleMDE and Quill. Both worked completely fine. Bonus: Added description of Quill's English locale. --- bl-kernel/admin/views/edit-page.php | 19 +++++++++++-------- bl-kernel/admin/views/edit-post.php | 17 ++++++++++------- bl-kernel/admin/views/new-page.php | 19 +++++++++++-------- bl-kernel/admin/views/new-post.php | 21 ++++++++++++--------- bl-plugins/quill/languages/en_US.json | 4 ++-- 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/bl-kernel/admin/views/edit-page.php b/bl-kernel/admin/views/edit-page.php index 35bcd2b0..1c98fe75 100644 --- a/bl-kernel/admin/views/edit-page.php +++ b/bl-kernel/admin/views/edit-page.php @@ -29,13 +29,16 @@ echo '
'; 'placeholder'=>$L->g('Title') )); + echo '
'; + // Content input - HTML::formTextarea(array( - 'name'=>'content', - 'value'=>$_Page->contentRaw(false), - 'class'=>'uk-width-1-1 uk-form-large', - 'placeholder'=>'' - )); + // HTML::formTextarea(array( + // 'name'=>'content', + // 'value'=>$_Post->contentRaw(false), + // 'class'=>'uk-width-1-1 uk-form-large', + // 'placeholder'=>'' + // )); + echo '
'; // Form buttons echo '
'; @@ -239,10 +242,10 @@ $(document).ready(function() } else { $(".sidebar-view").hide(); - $(view).show(); + $(view).show(); } }); }); - \ No newline at end of file + diff --git a/bl-kernel/admin/views/edit-post.php b/bl-kernel/admin/views/edit-post.php index c1d51b78..4a896ad5 100644 --- a/bl-kernel/admin/views/edit-post.php +++ b/bl-kernel/admin/views/edit-post.php @@ -29,13 +29,16 @@ echo '
'; 'placeholder'=>$L->g('Title') )); + echo '
'; + // Content input - HTML::formTextarea(array( - 'name'=>'content', - 'value'=>$_Post->contentRaw(false), - 'class'=>'uk-width-1-1 uk-form-large', - 'placeholder'=>'' - )); + // HTML::formTextarea(array( + // 'name'=>'content', + // 'value'=>$_Post->contentRaw(false), + // 'class'=>'uk-width-1-1 uk-form-large', + // 'placeholder'=>'' + // )); + echo '
'; // Form buttons echo '
@@ -197,7 +200,7 @@ $(document).ready(function() { } else { $(".sidebar-view").hide(); - $(view).show(); + $(view).show(); } }); diff --git a/bl-kernel/admin/views/new-page.php b/bl-kernel/admin/views/new-page.php index db5f1e05..6cf422af 100644 --- a/bl-kernel/admin/views/new-page.php +++ b/bl-kernel/admin/views/new-page.php @@ -23,13 +23,16 @@ echo '
'; 'placeholder'=>$L->g('Title') )); + echo '
'; + // Content input - HTML::formTextarea(array( - 'name'=>'content', - 'value'=>'', - 'class'=>'uk-width-1-1 uk-form-large', - 'placeholder'=>'' - )); + // HTML::formTextarea(array( + // 'name'=>'content', + // 'value'=>'', + // 'class'=>'uk-width-1-1 uk-form-large', + // 'placeholder'=>'' + // )); + echo '
'; // Form buttons echo '
@@ -212,10 +215,10 @@ $(document).ready(function() } else { $(".sidebar-view").hide(); - $(view).show(); + $(view).show(); } }); }); - \ No newline at end of file + diff --git a/bl-kernel/admin/views/new-post.php b/bl-kernel/admin/views/new-post.php index 95840c5d..c10694f8 100644 --- a/bl-kernel/admin/views/new-post.php +++ b/bl-kernel/admin/views/new-post.php @@ -23,13 +23,16 @@ echo '
'; 'placeholder'=>$L->g('Title') )); + echo '
'; + // Content input - HTML::formTextarea(array( - 'name'=>'content', - 'value'=>'', - 'class'=>'uk-width-1-1 uk-form-large', - 'placeholder'=>'' - )); + // HTML::formTextarea(array( + // 'name'=>'content', + // 'value'=>'', + // 'class'=>'uk-width-1-1 uk-form-large', + // 'placeholder'=>'' + // )); + echo '
'; // Form buttons echo '
@@ -73,7 +76,7 @@ echo '
'; )); echo ''; - + // IMAGES TAB // -------------------------------------------------------------------- echo '
  • '; @@ -182,10 +185,10 @@ $(document).ready(function() { } else { $(".sidebar-view").hide(); - $(view).show(); + $(view).show(); } }); }); - \ No newline at end of file + diff --git a/bl-plugins/quill/languages/en_US.json b/bl-plugins/quill/languages/en_US.json index aded94fc..ac8dc647 100644 --- a/bl-plugins/quill/languages/en_US.json +++ b/bl-plugins/quill/languages/en_US.json @@ -2,6 +2,6 @@ "plugin-data": { "name": "Quill", - "description": "" + "description": "Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need." } -} \ No newline at end of file +}