mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Add button to restore CKEditor remove_plugins to default value
This commit is contained in:
parent
fac3a9b7a7
commit
e3fa780295
1 changed files with 15 additions and 4 deletions
|
|
@ -207,7 +207,10 @@
|
||||||
<label class="x_control-label" for="font_size">{$lang->guide_remove_plugins}</label>
|
<label class="x_control-label" for="font_size">{$lang->guide_remove_plugins}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="text" id="remove_plugins" name="remove_plugins" value="{implode(', ', $editor_config->remove_plugins)}" />
|
<input type="text" id="remove_plugins" name="remove_plugins" value="{implode(', ', $editor_config->remove_plugins)}" />
|
||||||
<p class="x_help-block">{$lang->about_remove_plugins}</p>
|
<p class="x_help-block">
|
||||||
|
{$lang->about_remove_plugins}
|
||||||
|
<a href="#" class="default_remove_plugins" data-default-list="{implode(', ', Editor::$default_editor_config['remove_plugins'])}">{lang('admin.restore_default_viewport')}</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
|
|
@ -361,7 +364,15 @@
|
||||||
</section>
|
</section>
|
||||||
<script>
|
<script>
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// Editor Preview
|
|
||||||
|
// Restore default list of editor plugins to remove
|
||||||
|
$('.default_remove_plugins').on('click', function(e) {
|
||||||
|
var default_list = $(this).data('default-list');
|
||||||
|
$('#remove_plugins').val(default_list);
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Editor Preview
|
||||||
function preview(){
|
function preview(){
|
||||||
$('._preview iframe').css({
|
$('._preview iframe').css({
|
||||||
width : "100%",
|
width : "100%",
|
||||||
|
|
@ -371,13 +382,13 @@ jQuery(function($){
|
||||||
preview();
|
preview();
|
||||||
$('._preview li>a').click(preview);
|
$('._preview li>a').click(preview);
|
||||||
|
|
||||||
//init
|
// init
|
||||||
var fontPreview = $('.fontPreview');
|
var fontPreview = $('.fontPreview');
|
||||||
var fontSelector = $('.fontSelector');
|
var fontSelector = $('.fontSelector');
|
||||||
var checkedFont = fontSelector.filter(':checked').css('fontFamily');
|
var checkedFont = fontSelector.filter(':checked').css('fontFamily');
|
||||||
var changedSize = $('#font_size').val();
|
var changedSize = $('#font_size').val();
|
||||||
|
|
||||||
//change event
|
// change event
|
||||||
fontSelector.change(function(){
|
fontSelector.change(function(){
|
||||||
var myFont = $(this).css('font-family');
|
var myFont = $(this).css('font-family');
|
||||||
if ($(this).val() === 'Y') {
|
if ($(this).val() === 'Y') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue