{"id":15177297,"url":"https://github.com/ommu/yii2-redactor","last_synced_at":"2025-10-01T16:31:11.316Z","repository":{"id":57031357,"uuid":"134220989","full_name":"ommu/yii2-redactor","owner":"ommu","description":"Extension Redactor WYSIWYG for Yii2 framework","archived":false,"fork":true,"pushed_at":"2023-12-10T14:36:56.000Z","size":1075,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-14T01:38:48.453Z","etag":null,"topics":["imperavi","imperavi-redactor","redactor","wysiwyg","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yiidoc/yii2-redactor","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ommu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-21T05:12:43.000Z","updated_at":"2023-12-10T14:42:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ommu/yii2-redactor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-redactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-redactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-redactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ommu%2Fyii2-redactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ommu","download_url":"https://codeload.github.com/ommu/yii2-redactor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234882630,"owners_count":18901301,"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":["imperavi","imperavi-redactor","redactor","wysiwyg","yii2","yii2-extension"],"created_at":"2024-09-27T14:20:32.814Z","updated_at":"2025-10-01T16:31:11.298Z","avatar_url":"https://github.com/ommu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Installation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist ommu/yii2-redactor \"dev-master\"\n```\n\n or\n```\n \"ommu/yii2-redactor\": \"dev-master\"\n```\n\nto the require section of your composer.json.\n\nConfigure\n-----------------\n\nAdd to config file (config/web.php or common\\config\\main.php) \n\n```\n    'modules' =\u003e [\n        'redactor' =\u003e 'yii\\redactor\\RedactorModule',\n    ],\n```\nor if you want to change the upload directory.\nto path/to/uploadfolder\ndefault value `@webroot/uploads`\n\n```\n    'modules' =\u003e [\n        'redactor' =\u003e [\n            'class' =\u003e 'yii\\redactor\\RedactorModule',\n            'uploadDir' =\u003e '@webroot/path/to/uploadfolder',\n            'uploadUrl' =\u003e '@web/path/to/uploadfolder',\n            'imageAllowExtensions'=\u003e['jpg','png','gif']\n        ],\n    ],\n```\n\nnote: You need to create uploads folder and chmod and set security for folder upload\nreference: [Protect Your Uploads Folder with .htaccess](http://tomolivercv.wordpress.com/2011/07/24/protect-your-uploads-folder-with-htaccess/),\n[How to Setup Secure Media Uploads](http://digwp.com/2012/09/secure-media-uploads/)\n\nConfig view/form\n\n```\n\u003c?= $form-\u003efield($model, 'body')-\u003ewidget(\\yii\\redactor\\widgets\\Redactor::className()) ?\u003e\n```\n\nor not use ActiveField\n\n```\n\u003c?= \\yii\\redactor\\widgets\\Redactor::widget([\n    'model' =\u003e $model,\n    'attribute' =\u003e 'body'\n]) ?\u003e\n```\nor config advanced redactor reference [Docs](http://imperavi.com/redactor/docs/)\n\n```\n\u003c?= $form-\u003efield($model, 'body')-\u003ewidget(\\yii\\redactor\\widgets\\Redactor::className(), [\n    'clientOptions' =\u003e [\n        'imageManagerJson' =\u003e ['/redactor/upload/image-json'],\n        'imageUpload' =\u003e ['/redactor/upload/image'],\n        'fileUpload' =\u003e ['/redactor/upload/file'],\n        'lang' =\u003e 'zh_cn',\n        'plugins' =\u003e ['clips', 'fontcolor','imagemanager']\n    ]\n])?\u003e\n```\n\nchange default subfolder - optional, name subfolder only [a-zA-Z]\n```\n\u003c?= $form-\u003efield($model, 'body')-\u003ewidget(\\yii\\redactor\\widgets\\Redactor::className(), [\n    'clientOptions' =\u003e [\n        'imageManagerJson' =\u003e ['/redactor/upload/image-json', 'subfolder' =\u003e 'news'], \n        'imageUpload' =\u003e ['/redactor/upload/image', 'subfolder' =\u003e 'news'],\n        'fileUpload' =\u003e ['/redactor/upload/file', 'subfolder' =\u003e 'news'],\n        'lang' =\u003e 'zh_cn',\n        'plugins' =\u003e ['clips', 'fontcolor','imagemanager']\n    ]\n])?\u003e\n```\n\nBummer! i was tested on my project but not have many time to write document on file and usage.\nIf you have problem please create a [issue](https://github.com/ommu/yii2-redactor/issues)\n\nThanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fommu%2Fyii2-redactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fommu%2Fyii2-redactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fommu%2Fyii2-redactor/lists"}