{"id":21625439,"url":"https://github.com/coderius/yii2-pell-widget","last_synced_at":"2025-07-08T03:34:01.022Z","repository":{"id":56955644,"uuid":"219583062","full_name":"coderius/yii2-pell-widget","owner":"coderius","description":"Pell.JS smallest  WYSIWYG text editor YIIi2 widget. Text editor for web - only 3.54kB size.","archived":false,"fork":false,"pushed_at":"2019-11-18T15:47:03.000Z","size":268,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T08:51:20.123Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-04T19:45:23.000Z","updated_at":"2022-05-29T00:34:13.000Z","dependencies_parsed_at":"2022-08-21T08:50:35.327Z","dependency_job_id":null,"html_url":"https://github.com/coderius/yii2-pell-widget","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderius%2Fyii2-pell-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderius%2Fyii2-pell-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderius%2Fyii2-pell-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderius%2Fyii2-pell-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderius","download_url":"https://codeload.github.com/coderius/yii2-pell-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402312,"owners_count":21097328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T01:09:17.073Z","updated_at":"2025-04-11T12:35:05.475Z","avatar_url":"https://github.com/coderius.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pell content WYSIWYG editor Widget for Yii2\n===========================================\n\n[![Latest Version](https://img.shields.io/github/tag/coderius/yii2-pell-widget.svg?style=flat-square\u0026label=release)](https://github.com/coderius/yii2-pell-widget/releases)\n[![Software License](https://img.shields.io/github/license/coderius/yii2-pell-widget)](LICENSE.md)\n[![Code Coverage](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/?branch=master)\n[![Code Quality](https://img.shields.io/scrutinizer/quality/g/coderius/yii2-pell-widget.svg?style=flat-square)](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/?branch=master)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n[![Build Status](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/badges/build.png?b=master)](https://scrutinizer-ci.com/g/coderius/yii2-pell-widget/build-status/master)\n[![Build Status travis](https://img.shields.io/travis/coderius/yii2-pell-widget?label=travis%20build\u0026style=flat-square)](https://travis-ci.org/coderius/yii2-pell-widget)\n\n\nRenders a [Pell WYSIWYG text editor plugin](https://github.com/jaredreich/pell) widget.\n\n![Live demo](https://raw.githubusercontent.com/jaredreich/pell/master/demo.gif?raw=true \"Demo\")\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\ncomposer require coderius/yii2-pell-widget:\"~1.0\"\n```\nor add\n\n```json\n\"coderius/yii2-pell-widget\" : \"~1.0\"\n```\n\nto the require section of your application's `composer.json` file.\n\n## Usage\n\nFor example to use the pell editor with a [[\\yii\\base\\Model|model]]:\n\n ```php\necho Pell::widget([\n    'model' =\u003e $model,\n    'attribute' =\u003e 'text',\n]);\n  ```\n \nInside form without model:\n\n ```php\n$value = 'textarea some content';\n\necho \\coderius\\pell\\Pell::widget([\n    'name' =\u003e 'textarea-name',\n    'value'  =\u003e $value,\n    'clientOptions' =\u003e[]\n]);\n```\n\nThe following example will used not as an element of form:\n \n  ```php\necho Pell::widget([\n    'asFormPart'  =\u003e false,\n    'value'  =\u003e $value,\n    'clientOptions' =\u003e[\n        'onChange' =\u003e new JsExpression(\n            \"html =\u003e {\n                console.log(html);\n            },\"\n        )\n    ]\n]);\n  ```\n  \nYou can also use this widget in an [[\\yii\\widgets\\ActiveForm|ActiveForm]] using the [[\\yii\\widgets\\ActiveField::widget()|widget()]] method, for example like this:\n\n```php\n\nuse coderius\\pell\\Pell;\n\n\u003c?= $form-\u003efield($model, 'text')-\u003ewidget(Pell::className(), []);?\u003e\n```\n\n### About ClientOptions \n\nPlease, remember that if you are required to add javascript to the configuration of the js plugin and is required to be \nplain JS, make use of `JsExpression`. That class was made by Yii for that specific purpose. For example:\n \n```php \n// Having the following scenario\n\u003cscript\u003e \n    function jsFunctionToBeCalled() {\n        // ...\n    }\n\u003c/script\u003e\n\n\u003c?= $form-\u003efield($model, 'content')-\u003ewidget(Pell::className(), [\n        'clientOptions' =\u003e [\n            'defaultParagraphSeparato' =\u003e 'div',\n\n            // ...\n\n            'actions' =\u003e [\n                'bold',\n                'italic',\n                'underline',\n                'strikethrough',\n                'heading1',\n                'heading2',\n                'paragraph',\n                'quote',\n                'olist',\n                'ulist',\n                'code',\n                'line',\n                'link',\n                'image',\n                [\n                    'name'   =\u003e 'backColor',\n                    'icon'   =\u003e '\u003cdiv style=\"background-color:pink;\"\u003eA\u003c/div\u003e',\n                    'title'  =\u003e 'Highlight Color',\n                    // this will render the function name without quotes on the configuration options of the plugin\n                    'result' =\u003e new JsExpression('jsFunctionToBeCalled')\n                ],\n            ],\n            \n            // ...\n        ]\n        \n    ]\n]); ?\u003e\n```\n\n## Examples widget usage\nPlease see [Examples usage in yii2 view files](https://github.com/coderius/yii2-pell-widget/blob/master/examples/some-yii2-view.php) for more examples.\n\n## Testing\n\n``` bash\n$ phpunit\n```\n\n## Further Information\n\nPlease, check the [Pell plugin github](https://github.com/jaredreich/pell) documentation for further \ninformation about its configuration options.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Sergio Coderius](https://github.com/coderius)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n \n\u003ci\u003eWeb development has never been so fun!\u003c/i\u003e  \n[coderius.biz.ua](https://coderius.biz.ua)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderius%2Fyii2-pell-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderius%2Fyii2-pell-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderius%2Fyii2-pell-widget/lists"}