Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skeeks-semenov/yii2-link-activation
Conversion of inactive links in the text into active clickable links
https://github.com/skeeks-semenov/yii2-link-activation
html links skeeks skeeks-cms text yii yii2 yii2-extension
Last synced: 26 days ago
JSON representation
Conversion of inactive links in the text into active clickable links
- Host: GitHub
- URL: https://github.com/skeeks-semenov/yii2-link-activation
- Owner: skeeks-semenov
- License: bsd-3-clause
- Created: 2019-04-06T12:30:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-07T10:56:55.000Z (over 5 years ago)
- Last Synced: 2024-11-13T14:55:08.072Z (about 1 month ago)
- Topics: html, links, skeeks, skeeks-cms, text, yii, yii2, yii2-extension
- Language: JavaScript
- Homepage: https://cms.skeeks.com
- Size: 37.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Conversion of inactive links in the text
================[](https://skeeks.com/blog/programming/397-kak-preobrazovat-neaktivnye-ssylki-v-tekste-v-aktivnye-klikabelnye)
A small extension to convert active links in the text to active (clickable).
It can convert html or text, it is possible to convert on the client (js) as well as on the backend (php).Небольшое расширение для преобразования неактивных ссылок в тексте в активные (кликабельные).
Может преобразовывать html или текст, возможно преобразовывать на клиенте (js) а так же на бэкенде (php).[![Latest Stable Version](https://poser.pugx.org/skeeks/yii2-link-activation/v/stable.png)](https://packagist.org/packages/skeeks/yii2-link-activation)
[![Total Downloads](https://poser.pugx.org/skeeks/yii2-link-activation/downloads.png)](https://packagist.org/packages/skeeks/yii2-link-activation)Installation
------------```sh
$ composer require skeeks/yii2-link-activation "^0.0.3"
```Or add this to your `composer.json` file:
```json
{
"require": {
"skeeks/yii2-link-activation": "^0.0.3"
}
}
```Client replace (on js)
-----```php
\skeeks\yii2\linkActivation\assets\TextHandlerAsset::register($this);
$this->registerJs(<<
```
```html
Какой то текст со ссылками https://test.ru,
https://google.ru/search
Все ссылки будут автоматически https://cms.skeeks.com/blog/releases/2-zapusk-sayta-dlya-skeeks-cms определены в этом тексте и станут кликабельными
```Backend replace
-----```php
$handler = new \skeeks\yii2\linkActivation\TextHandler();
$handler->short_link_max_length = 45;
echo $handler->replace($yourText);
?>
``````php
= (new \skeeks\yii2\linkActivation\TextHandler())->replace($yourText); ?>
```Screenshot
----------[](https://skeeks.com/uploads/all/7c/cb/dc/7ccbdc8a1393cdb88d87635b610fb108.png)
Video
-----[](https://youtu.be/lzmuahaNwQQ)
Links
----------
* [Github](https://github.com/skeeks-semenov/yii2-link-activation)
* [Changelog](https://github.com/skeeks-semenov/yii2-link-activation/blob/master/CHANGELOG.md)
* [Issues](https://github.com/skeeks-semenov/yii2-link-activation/issues)
* [Packagist](https://packagist.org/packages/skeeks/yii2-link-activation)
* [SkeekS blog post](https://skeeks.com/blog/programming/397-kak-preobrazovat-neaktivnye-ssylki-v-tekste-v-aktivnye-klikabelnye)
* [SkeekS marketplace](https://cms.skeeks.com/marketplace/components/tools/other/396-preobrazovanie-neaktivnyh-ssylok-v-tekste)___
> [![skeeks!](https://skeeks.com/img/logo/logo-no-title-80px.png)](https://skeeks.com)
SkeekS CMS (Yii2) — quickly, easily and effectively!
[skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)