-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding WYSIWYG field in NgRest (#230)
* Update Wig css * Update Wig display * Add Wig Ngrest Plugin * Update and rename Wig.php to Wysiwyg.php * Update CHANGELOG.md * Update Wysiwyg.php * Update _ng-wig.scss
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace luya\admin\ngrest\plugins; | ||
|
||
use luya\admin\ngrest\base\Plugin; | ||
|
||
/** | ||
* Create a WYSIWYG input for a given field. | ||
* | ||
* | ||
* ```php | ||
* ['mytext' => ['wysiwyg']] | ||
* ``` | ||
* | ||
* @author David-Julian Buch <david@web-premiere.fr> | ||
* @since 1.2.3 | ||
*/ | ||
class Wysiwyg extends Plugin | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function renderList($id, $ngModel) | ||
{ | ||
return $this->createListTag($ngModel); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function renderCreate($id, $ngModel) | ||
{ | ||
return $this->createFormTag('zaa-wysiwyg', $id, $ngModel); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function renderUpdate($id, $ngModel) | ||
{ | ||
return $this->renderCreate($id, $ngModel); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters