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.
This commit is contained in:
Hakim Zulkufli 2017-04-30 19:50:32 +08:00
parent 84aa89a861
commit 743a88c29b
5 changed files with 46 additions and 34 deletions

View File

@ -29,13 +29,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
'placeholder'=>$L->g('Title') 'placeholder'=>$L->g('Title')
)); ));
echo '<div style="padding-top: 10px"></div>';
// Content input // Content input
HTML::formTextarea(array( // HTML::formTextarea(array(
'name'=>'content', // 'name'=>'content',
'value'=>$_Page->contentRaw(false), // 'value'=>$_Post->contentRaw(false),
'class'=>'uk-width-1-1 uk-form-large', // 'class'=>'uk-width-1-1 uk-form-large',
'placeholder'=>'' // 'placeholder'=>''
)); // ));
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" value="'.$_Post->contentRaw(false).'" style="margin-bottom: 10px"></div>';
// Form buttons // Form buttons
echo '<div class="uk-form-row uk-margin-bottom">'; echo '<div class="uk-form-row uk-margin-bottom">';
@ -239,10 +242,10 @@ $(document).ready(function()
} }
else { else {
$(".sidebar-view").hide(); $(".sidebar-view").hide();
$(view).show(); $(view).show();
} }
}); });
}); });
</script> </script>

View File

@ -29,13 +29,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
'placeholder'=>$L->g('Title') 'placeholder'=>$L->g('Title')
)); ));
echo '<div style="padding-top: 10px"></div>';
// Content input // Content input
HTML::formTextarea(array( // HTML::formTextarea(array(
'name'=>'content', // 'name'=>'content',
'value'=>$_Post->contentRaw(false), // 'value'=>$_Post->contentRaw(false),
'class'=>'uk-width-1-1 uk-form-large', // 'class'=>'uk-width-1-1 uk-form-large',
'placeholder'=>'' // 'placeholder'=>''
)); // ));
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" value="'.$_Post->contentRaw(false).'" style="margin-bottom: 10px"></div>';
// Form buttons // Form buttons
echo '<div class="uk-form-row uk-margin-bottom"> echo '<div class="uk-form-row uk-margin-bottom">
@ -197,7 +200,7 @@ $(document).ready(function() {
} }
else { else {
$(".sidebar-view").hide(); $(".sidebar-view").hide();
$(view).show(); $(view).show();
} }
}); });

View File

@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
'placeholder'=>$L->g('Title') 'placeholder'=>$L->g('Title')
)); ));
echo '<div style="padding-top: 10px"></div>';
// Content input // Content input
HTML::formTextarea(array( // HTML::formTextarea(array(
'name'=>'content', // 'name'=>'content',
'value'=>'', // 'value'=>'',
'class'=>'uk-width-1-1 uk-form-large', // 'class'=>'uk-width-1-1 uk-form-large',
'placeholder'=>'' // 'placeholder'=>''
)); // ));
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
// Form buttons // Form buttons
echo '<div class="uk-form-row uk-margin-bottom"> echo '<div class="uk-form-row uk-margin-bottom">
@ -212,10 +215,10 @@ $(document).ready(function()
} }
else { else {
$(".sidebar-view").hide(); $(".sidebar-view").hide();
$(view).show(); $(view).show();
} }
}); });
}); });
</script> </script>

View File

@ -23,13 +23,16 @@ echo '<div class="bl-publish-view uk-width-8-10">';
'placeholder'=>$L->g('Title') 'placeholder'=>$L->g('Title')
)); ));
echo '<div style="padding-top: 10px"></div>';
// Content input // Content input
HTML::formTextarea(array( // HTML::formTextarea(array(
'name'=>'content', // 'name'=>'content',
'value'=>'', // 'value'=>'',
'class'=>'uk-width-1-1 uk-form-large', // 'class'=>'uk-width-1-1 uk-form-large',
'placeholder'=>'' // 'placeholder'=>''
)); // ));
echo '<div id="jscontent" name="content" class="uk-width-1-1 uk-form-large" placeholder="" style="margin-bottom: 10px"></div>';
// Form buttons // Form buttons
echo '<div class="uk-form-row uk-margin-bottom"> echo '<div class="uk-form-row uk-margin-bottom">
@ -73,7 +76,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
)); ));
echo '</li>'; echo '</li>';
// IMAGES TAB // IMAGES TAB
// -------------------------------------------------------------------- // --------------------------------------------------------------------
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>'; echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>';
@ -182,10 +185,10 @@ $(document).ready(function() {
} }
else { else {
$(".sidebar-view").hide(); $(".sidebar-view").hide();
$(view).show(); $(view).show();
} }
}); });
}); });
</script> </script>

View File

@ -2,6 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Quill", "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."
} }
} }