Skip to content

Commit

Permalink
Merge pull request #42 from mostafaznv/dev
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
mostafaznv authored Jan 16, 2023
2 parents b2aeb33 + e86d27b commit 190633d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CkEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,18 @@ public function __construct($name, $attribute = null, callable $resolveCallback

$config = config('nova-ckeditor');

$defaultTextPartLanguage = [
['title' => 'Farsi', 'languageCode' => 'fa'],
['title' => 'English', 'languageCode' => 'en']
];

$this->toolbar = $config['toolbar']['items'];
$this->height = $config['toolbar']['height'];
$this->imageBrowser = $config['toolbar']['browser']['image'];
$this->videoBrowser = $config['toolbar']['browser']['video'];
$this->snippetBrowser = $this->prepareSnippets($config['toolbar']['snippets']);
$this->contentLanguage = $config['toolbar']['content-lang'];
$this->textPartLanguage = $config['toolbar']['text-part-language'];
$this->textPartLanguage = $config['toolbar']['text-part-language'] ?? $defaultTextPartLanguage;
$this->uiLanguage = $config['toolbar']['ui-language']['name'] ?? 'en';
$this->shouldNotGroupWhenFull = $config['toolbar']['should-not-group-when-full'];
$this->videoModel = $config['video-model'];
Expand Down

0 comments on commit 190633d

Please sign in to comment.