Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

Conversion of inactive links in the text
================

[SkeekS blog](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
----------

[SkeekS blog](https://skeeks.com/uploads/all/7c/cb/dc/7ccbdc8a1393cdb88d87635b610fb108.png)

Video
-----

[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)