Skip to content

Commit

Permalink
Merge pull request #17 from froala/removed-initClientOptions
Browse files Browse the repository at this point in the history
Removed unnecessary call to initClientOptions
  • Loading branch information
stefanneculai authored Apr 19, 2017
2 parents 0a8aa5f + cb25328 commit df9c533
Showing 1 changed file with 0 additions and 166 deletions.
166 changes: 0 additions & 166 deletions FroalaEditorWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function run()
public function registerClientScript()
{
$view = $this->getView();
$this->initClientOptions();
$asset = FroalaEditorAsset::register($view);
$asset->registerClientPlugins($this->clientPlugins, $this->excludedPlugins);

Expand Down Expand Up @@ -111,169 +110,4 @@ public function registerClientScript()

$view->registerJs("\$('#$id').froalaEditor($jsOptions);");
}

/**
* client options init
*/
protected function initClientOptions()
{
// KindEditor optional parameters
$params = [
'charCounterCount',
'charCounterMax',
'codeBeautifier',
'codeMirror',
'codeMirrorOptions',
'colorsBackground',
'colorsDefaultTab',
'colorsStep',
'colorsText',
'direction',
'disableRightClick',
'editInPopup',
'editorClass',
'emoticonsSet',
'emoticonsStep',
'enter',
'entities',
'fileAllowedTypes',
'fileMaxSize',
'fileUploadMethod',
'fileUploadParam',
'fileUploadParams',
'fileUploadToS3',
'fileUploadURL',
'fileUseSelectedText',
'fontFamily',
'fontFamilySelection',
'fontSize',
'fontSizeSelection',
'fullPage',
'height',
'heightMax',
'heightMin',
'htmlAllowComments',
'htmlAllowedAttrs',
'htmlAllowedEmptyTags',
'htmlAllowedTags',
'htmlRemoveTags',
'htmlSimpleAmpersand',
'iframe',
'iframeStyle',
'iframeStyleFiles',
'imageAllowedTypes',
'imageAltButtons',
'imageDefaultAlign',
'imageDefaultDisplay',
'imageDefaultWidth',
'imageEditButtons',
'imageInsertButtons',
'imageManagerDeleteMethod',
'imageManagerDeleteParams',
'imageManagerDeleteURL',
'imageManagerLoadMethod',
'imageManagerLoadParams',
'imageManagerLoadURL',
'imageManagerPageSize',
'imageManagerPreloader',
'imageManagerScrollOffset',
'imageMaxSize',
'imageMove',
'imageMultipleStyles',
'imagePaste',
'imageResize',
'imageResizeWithPercent',
'imageSizeButtons',
'imageStyles',
'imageTextNear',
'imageUploadMethod',
'imageUploadParam',
'imageUploadParams',
'imageUploadToS3',
'imageUploadURL',
'initOnClick',
'inlineStyles',
'keepFormatOnDelete',
'language',
'lineBreakerOffset',
'lineBreakerTags',
'linkAlwaysBlank',
'linkAlwaysNoFollow',
'linkAttributes',
'linkAutoPrefix',
'linkConvertEmailAddress',
'linkEditButtons',
'linkInsertButtons',
'linkList',
'linkMultipleStyles',
'linkStyles',
'linkText',
'multiLine',
'paragraphFormat',
'paragraphFormatSelection',
'paragraphMultipleStyles',
'paragraphStyles',
'pasteAllowLocalImages',
'pasteDeniedAttrs',
'pasteDeniedTags',
'pastePlain',
'placeholderText',
'requestHeaders',
'requestWithCORS',
'saveInterval',
'saveMethod',
'saveParam',
'saveParams',
'saveURL',
'scrollableContainer',
'shortcutsEnabled',
'spellcheck',
'tabSpaces',
'tableCellMultipleStyles',
'tableCellStyles',
'tableColors',
'tableColorsButtons',
'tableColorsStep',
'tableEditButtons',
'tableInsertButtons',
'tableInsertMaxSize',
'tableMultipleStyles',
'tableResizerOffset',
'tableResizingLimit',
'tableStyles',
'theme',
'toolbarBottom',
'toolbarButtons',
'toolbarButtonsMD',
'toolbarButtonsSM',
'toolbarButtonsXS',
'toolbarInline',
'toolbarSticky',
'toolbarStickyOffset',
'toolbarVisibleWithoutSelection',
'typingTimer',
'useClasses',
'videoDefaultAlign',
'videoDefaultDisplay',
'videoEditButtons',
'videoInsertButtons',
'videoResize',
'videoSizeButtons',
'videoTextNear',
'width',
'zIndex',
'key'
];
$options = [];
$options['height'] = '80px';
$options['theme'] = 'dark';
$options['language'] = 'en_gb';
foreach ($params as $key) {
if (isset($this->clientOptions[$key])) {
$options[$key] = $this->clientOptions[$key];
}
}
$this->clientOptions = $options;
}

}

0 comments on commit df9c533

Please sign in to comment.