-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
472 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea | ||
/vendor |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Robert Korulczyk | ||
Copyright (c) 2017 Robert Korulczyk <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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 |
---|---|---|
@@ -1,2 +1,62 @@ | ||
# yii-tinymce | ||
TinyMCE editor integration for Yii 1.1 | ||
TinyMCE integration for Yii 1.1 | ||
=============================== | ||
|
||
Yii 1.1 extension that provides basic integration with [TinyMce editor](https://www.tinymce.com/). | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
The preferred way to install this extension is through [composer](https://getcomposer.org/download/). | ||
|
||
Either run | ||
|
||
```shell | ||
php composer.phar require rob006/yii-tinymce | ||
``` | ||
|
||
or add | ||
|
||
```json | ||
"rob006/yii2-tinymce": "^1.0" | ||
``` | ||
|
||
to the require section of your `composer.json` file. | ||
|
||
|
||
Usage | ||
----- | ||
|
||
Basic usage: | ||
|
||
```php | ||
<?php $this->widget('TinyMceWidget', [ | ||
'model' => $model, | ||
'attribute' => 'value', | ||
]) ?> | ||
``` | ||
|
||
Usage with custom settings and [Yiistrap](http://www.getyiistrap.com/) and [elFinder](https://github.com/rob006/yii-elfinder2) extensions integration. | ||
|
||
```php | ||
<?= $form->textAreaControlGroup($model, 'value', ['rows' => 6, 'span' => 8,]) ?> | ||
<?php $this->widget('TinyMceWidget', [ | ||
'model' => $model, | ||
'attribute' => 'value', | ||
'dry_run' => true, | ||
'fileManager' => [ | ||
'class' => 'TinyMceElFinder', | ||
'popupConnectorRoute' => 'pageAssetsPopup', | ||
'popupTitle' => 'Files', | ||
], | ||
'settings' => [ | ||
'content_css' => $this->getEditorStyles(), | ||
], | ||
]) ?> | ||
``` | ||
Resources | ||
--------- | ||
|
||
* [Extension page](https://github.com/rob006/yii-tinymce) | ||
* [elFinder extension](https://github.com/rob006/yii-elfinder2) | ||
* [TinyMce page](https://www.tinymce.com/) |
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,37 @@ | ||
{ | ||
"name": "rob006/yii-tinymce", | ||
"description": "TinyMCE editor integration for Yii 1.1.", | ||
"type": "yii-extension", | ||
"keywords": ["yii", "extension", "TinyMCE", "widget", "elFinder"], | ||
"minimum-stability": "dev", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Robert Korulczyk", | ||
"email": "[email protected]", | ||
"homepage": "https://rob006.net/" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/rob006/yii-tinymce/issues", | ||
"source": "https://github.com/rob006/yii-tinymce" | ||
}, | ||
"require": { | ||
"php": ">=5.4.0", | ||
"tinymce/tinymce": "^4.5.6", | ||
"yiisoft/yii": "~1.1.18" | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"src/" | ||
] | ||
}, | ||
"suggest": { | ||
"rob006/yii-elfinder2": "Provides file manager integration with editor." | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.0-dev" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the yii-tinymce. | ||
* | ||
* Copyright (c) 2017 Robert Korulczyk <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE.md. | ||
*/ | ||
|
||
/** | ||
* Abstract FileManager class to use with TinyMce. | ||
* For example see elFinder extension. | ||
* | ||
* @see https://github.com/rob006/yii-elfinder2 | ||
* | ||
* @author Robert Korulczyk <[email protected]> | ||
* @since 1.0.0 | ||
*/ | ||
abstract class TinyMceFileManager extends CComponent { | ||
|
||
/** | ||
* Initialize FileManager component, registers required JS. | ||
*/ | ||
public function init() { | ||
} | ||
|
||
/** | ||
* @return string JavaScript callback function, starts with "js:". | ||
*/ | ||
abstract public function getFileBrowserCallback(); | ||
} |
Oops, something went wrong.