yii2 imperavi widget
1.0.0
Imperavi Redactor Widget 고품질 Wysiwyg 편집기 인 Imperavi Redactor 10.2.5의 래퍼입니다.
Imperavi Redactor 자체는 독점적 인 상업용 저작권이있는 소프트웨어이지만 YII Community는 OEM 라이센스를 구입했기 때문에 YII와 함께 무료로 사용할 수 있습니다.
이 확장을 설치하는 선호하는 방법은 작곡가를 통하는 것입니다.
어느 쪽이든
$ php composer.phar require --prefer-dist vova07/yii2-imperavi-widget " * "또는 추가
"vova07/yii2-imperavi-widget" : " * " composer.json 파일의 require 섹션에
확장자가 설치되면 코드에서 간단히 사용하십시오.
echo vova07 imperavi Widget:: widget ([
' name ' => ' redactor ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' plugins ' => [
' clips ' ,
' fullscreen ' ,
],
' clips ' => [
[ ' Lorem ipsum... ' , ' Lorem... ' ],
[ ' red ' , ' <span class="label-red">red</span> ' ],
[ ' green ' , ' <span class="label-green">green</span> ' ],
[ ' blue ' , ' <span class="label-blue">blue</span> ' ],
],
],
]); use vova07 imperavi Widget ;
echo $ form -> field ( $ model , ' content ' )-> widget (Widget:: className (), [
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' plugins ' => [
' clips ' ,
' fullscreen ' ,
],
' clips ' => [
[ ' Lorem ipsum... ' , ' Lorem... ' ],
[ ' red ' , ' <span class="label-red">red</span> ' ],
[ ' green ' , ' <span class="label-green">green</span> ' ],
[ ' blue ' , ' <span class="label-blue">blue</span> ' ],
],
],
]); echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' plugins ' => [
' clips ' ,
' fullscreen ' ,
],
' clips ' => [
[ ' Lorem ipsum... ' , ' Lorem... ' ],
[ ' red ' , ' <span class="label-red">red</span> ' ],
[ ' green ' , ' <span class="label-green">green</span> ' ],
[ ' blue ' , ' <span class="label-blue">blue</span> ' ],
],
],
]); // DefaultController.php
public function actions ()
{
return [
' images-get ' => [
' class ' => ' vova07imperaviactionsGetImagesAction ' ,
' url ' => ' http://my-site.com/images/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' options ' => [ ' only ' => [ ' *.jpg ' , ' *.jpeg ' , ' *.png ' , ' *.gif ' , ' *.ico ' ]], // These options are by default.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' imageUpload ' => Url:: to ([ ' default/image-upload ' ]),
' imageManagerJson ' => Url:: to ([ ' /default/images-get ' ]),
' plugins ' => [
' imagemanager ' ,
],
],
]); // DefaultController.php
public function actions ()
{
return [
' files-get ' => [
' class ' => ' vova07imperaviactionsGetFilesAction ' ,
' url ' => ' http://my-site.com/files/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' options ' => [ ' only ' => [ ' *.txt ' , ' *.md ' ]], // These options are by default.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' fileUpload ' => Url:: to ([ ' default/file-upload ' ]),
' fileManagerJson ' => Url:: to ([ ' /default/files-get ' ]),
' plugins ' => [
' filemanager ' ,
],
],
]); // DefaultController.php
public function actions ()
{
return [
' image-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/images/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' imageUpload ' => Url:: to ([ ' /default/image-upload ' ]),
' plugins ' => [
' imagemanager ' ,
],
],
]); // DefaultController.php
public function actions ()
{
return [
' file-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/files/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' uploadOnlyImage ' => false , // For any kind of files uploading.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' fileUpload ' => Url:: to ([ ' /default/file-upload ' ]),
' plugins ' => [
' filemanager ' ,
],
],
]); // DefaultController.php
public function actions ()
{
return [
' file-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/files/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' uploadOnlyImage ' => false , // For any kind of files uploading.
' unique ' => false ,
' replace ' => true , // By default it throw an excepiton instead.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' fileUpload ' => Url:: to ([ ' /default/file-upload ' ]),
' plugins ' => [
' filemanager ' ,
],
],
]); // DefaultController.php
public function actions ()
{
return [
' file-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/files/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' uploadOnlyImage ' => false , // For any kind of files uploading.
' unique ' => false ,
' translit ' => true ,
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' fileUpload ' => Url:: to ([ ' /default/file-upload ' ]),
' plugins ' => [
' filemanager ' ,
],
]
]); echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' plugins ' => [
' clips ' ,
' fullscreen '
]
],
' plugins ' => [
' my-custom-plugin ' => ' appassetsMyPluginBundle ' ,
],
]); // DefaultController.php
public function actions ()
{
return [
' images-get ' => [
' class ' => ' vova07imperaviactionsGetImagesAction ' ,
' url ' => ' http://my-site.com/images/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
],
' image-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/images/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
],
' file-delete ' => [
' class ' => ' vova07imperaviactionsDeleteFileAction ' ,
' url ' => ' http://my-site.com/statics/ ' , // Directory URL address, where files are stored.
' path ' => ' /var/www/my-site.com/web/statics ' , // Or absolute path to directory where files are stored.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' imageUpload ' => Url:: to ([ ' /default/image-upload ' ]),
' imageDelete ' => Url:: to ([ ' /default/file-delete ' ]),
' imageManagerJson ' => Url:: to ([ ' /default/images-get ' ]),
],
' plugins ' => [
' imagemanager ' => ' vova07imperavibundlesImageManagerAsset ' ,
],
]); // DefaultController.php
public function actions ()
{
return [
' files-get ' => [
' class ' => ' vova07imperaviactionsGetFilesAction ' ,
' url ' => ' http://my-site.com/images/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
],
' file-upload ' => [
' class ' => ' vova07imperaviactionsUploadFileAction ' ,
' url ' => ' http://my-site.com/files/ ' , // Directory URL address, where files are stored.
' path ' => ' @alias/to/my/path ' , // Or absolute path to directory where files are stored.
' uploadOnlyImage ' => false , // For any kind of files uploading.
],
' file-delete ' => [
' class ' => ' vova07imperaviactionsDeleteFileAction ' ,
' url ' => ' http://my-site.com/statics/ ' , // Directory URL address, where files are stored.
' path ' => ' /var/www/my-site.com/web/statics ' , // Or absolute path to directory where files are stored.
],
];
}
// View.php
echo vova07 imperavi Widget:: widget ([
' selector ' => ' #my-textarea-id ' ,
' settings ' => [
' lang ' => ' ru ' ,
' minHeight ' => 200 ,
' fileUpload ' => Url:: to ([ ' /default/file-upload ' ]),
' fileDelete ' => Url:: to ([ ' /default/file-delete ' ]),
' fileManagerJson ' => Url:: to ([ ' /default/files-get ' ]),
],
' plugins ' => [
' filemanager ' => ' vova07imperavibundlesFileManagerAsset ' ,
],
]);$ phpunit구성 옵션에 대한 자세한 내용은 Imperavi Redactor V10 문서를 확인하십시오.
자세한 내용은 기여를 참조하십시오.
BSD 라이센스 (BSD). 자세한 내용은 라이센스 파일을 참조하십시오.
자세한 내용은 업그레이드 가이드를 확인하십시오.