# angular-enhance-text **Repository Path**: mirrors_pexip/angular-enhance-text ## Basic Information - **Project Name**: angular-enhance-text - **Description**: Enhances text by replacing commonly used links and characters, e.g. directly embedding youtube videos, replacing smilies etc. This is useful for creating a web chat application. - **Primary Language**: Unknown - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-03-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Angular Enhance Text filter [](https://travis-ci.org/Raydiation/angular-enhance-text) [](https://coveralls.io/r/Raydiation/angular-enhance-text?branch=master) [](http://badge.fury.io/bo/angular-enhance-text) Enhances text by replacing commonly used links and characters, e.g. directly embedding youtube videos, replacing smilies etc. This is useful for creating a web chat application. All replacements are cached so there's no downside in using it as filter. Current features include: * Embed smilies * Embed links * Embed images (gif|jpg|jpeg|tiff|png|svg|webp) * Embed videos (ogv|webm) * Embed youtube videos * Sanitize output ## License GNU Lesser General Public License 3+ (LGPLv3+) ## How to use Install **angular-enhance-text** via bower and link it plus **angular** and **angular-sanitize** in your website: bower install angular-enhance-text Finally inject it into your app like: ```javascript angular.module('MyApp', ['bernhardposselt.enhancetext']); ``` The filter is available in your templates by using: ```html
``` All content to the filter is explicitely sanitized and marked as safe. . For a complete example see the examples folder. ## Configuration To configure the provider, inject the provider in your config method: ```javascript angular.module('MyApp', ['bernhardposselt.enhancetext']). config(['enhanceTextFilterProvider', function (enhanceTextFilterProvider) { enhanceTextFilterProvider.setOptions({ // your options in here }); }]); ``` The following options are available: ```javascript enhanceTextFilterProvider.setOptions({ cache: true, // stores replaced text so angular update does not slow down newLineToBr: true, // replaces \n with