AssetBundle for Search Datatables highlighting with mark.js
composer require --prefer-dist "ayrozjlc/yii2-datatables-mark:*"
or add
"ayrozjlc/yii2-datatables-mark": "dev-master"
to the require section of your composer.json file.
in view (for example: @app/views/layouts/main.php)
// ...
use ayrozjlc\datatablesmark\DataTablesMarkAsset;
// ...
DataTablesMarkAsset::register($this);or add to your assets/AppAsset.php
public $depends = [
// ...
'ayrozjlc\datatablesmark\DataTablesMarkAsset',
];add option in datatables
$(".myTable").DataTable({
mark: true
});