{"id":13536118,"url":"https://github.com/BigKuCha/yii2-ueditor-widget","last_synced_at":"2025-04-02T02:32:19.329Z","repository":{"id":26568305,"uuid":"30022430","full_name":"BigKuCha/yii2-ueditor-widget","owner":"BigKuCha","description":"UEditor for Yii2","archived":false,"fork":false,"pushed_at":"2018-11-23T11:32:35.000Z","size":3041,"stargazers_count":156,"open_issues_count":22,"forks_count":69,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T03:06:50.960Z","etag":null,"topics":["javascript","ueditor","yii2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BigKuCha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-29T14:00:37.000Z","updated_at":"2024-12-26T10:13:37.000Z","dependencies_parsed_at":"2022-08-31T05:03:12.190Z","dependency_job_id":null,"html_url":"https://github.com/BigKuCha/yii2-ueditor-widget","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigKuCha%2Fyii2-ueditor-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigKuCha%2Fyii2-ueditor-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigKuCha%2Fyii2-ueditor-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigKuCha%2Fyii2-ueditor-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BigKuCha","download_url":"https://codeload.github.com/BigKuCha/yii2-ueditor-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743896,"owners_count":20826627,"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":["javascript","ueditor","yii2"],"created_at":"2024-08-01T09:00:34.982Z","updated_at":"2025-04-02T02:32:17.987Z","avatar_url":"https://github.com/BigKuCha.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"百度UEditor\n===========\n[![Latest Stable Version](https://poser.pugx.org/kucha/ueditor/v/stable)](https://packagist.org/packages/kucha/ueditor) [![Total Downloads](https://poser.pugx.org/kucha/ueditor/downloads)](https://packagist.org/packages/kucha/ueditor) \n### 安装\nEither run\n\n```\n$ php composer.phar require kucha/ueditor \"*\"\n```\n\nor add\n\n```\n\"kucha/ueditor\": \"*\"\n```\n\nto the ```require``` section of your `composer.json` file.\n\n### 应用\n\ncontroller:  \n\n```\npublic function actions()\n{\n    return [\n        'upload' =\u003e [\n            'class' =\u003e 'kucha\\ueditor\\UEditorAction',\n        ]\n    ];\n}\n```\n\nview:  \n\n```\necho \\kucha\\ueditor\\UEditor::widget(['name' =\u003e 'xxxx']);\n```\n\n或者：\n\n```\necho $form-\u003efield($model,'colum')-\u003ewidget('kucha\\ueditor\\UEditor',[]);\n```\n### 说明\n `ueditor`只支持2种语言，`en-us`和`zh-cn`,默认跟随系统语言 `Yii::$app-\u003elanguage`,可以通过2种方式设置，1.修改系统语言，在`main.php`(高级版) 或者`web.php`(基础版)添加`'language' =\u003e 'zh-CN',`。2.实例化的时候配置语言选项，见下边配置\n \n### 配置相关\n\n##### 编辑器相关配置，请在`view` 中配置，参数为`clientOptions`，比如定制菜单，编辑器大小等等，具体参数请查看[UEditor官网文档](http://fex-team.github.io/ueditor/)。\n\n简单实例:  \n```php\nuse \\kucha\\ueditor\\UEditor;\necho UEditor::widget([\n    'clientOptions' =\u003e [\n        //编辑区域大小\n        'initialFrameHeight' =\u003e '200',\n        //设置语言\n        'lang' =\u003e'en', //中文为 zh-cn\n        //定制菜单\n        'toolbars' =\u003e [\n            [\n                'fullscreen', 'source', 'undo', 'redo', '|',\n                'fontsize',\n                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat',\n                'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|',\n                'forecolor', 'backcolor', '|',\n                'lineheight', '|',\n                'indent', '|'\n            ],\n        ]\n]);\n```\n\n##### 文件上传相关配置，请在`controller`中配置，参数为`config`,例如文件上传路径等；更多参数请参照 [config.php](https://github.com/BigKuCha/yii2-ueditor-widget/blob/master/config.php) (跟UEditor提供的config.json一样)\n\n简单实例:  \n```php\npublic function actions()\n{\n    return [\n        'upload' =\u003e [\n            'class' =\u003e 'kucha\\ueditor\\UEditorAction',\n            'config' =\u003e [\n                \"imageUrlPrefix\"  =\u003e \"http://www.baidu.com\",//图片访问路径前缀\n                \"imagePathFormat\" =\u003e \"/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}\" //上传保存路径\n                \"imageRoot\" =\u003e Yii::getAlias(\"@webroot\"),\n            ],\n        ]\n    ];\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBigKuCha%2Fyii2-ueditor-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBigKuCha%2Fyii2-ueditor-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBigKuCha%2Fyii2-ueditor-widget/lists"}