# Help with text replacement plugin

**URL:** <https://www.ruby-forum.com/t/help-with-text-replacement-plugin/168648>\
**Category:** Rails\
**Created:** [May 23, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/help-with-text-replacement-plugin/168648 "2009-05-23T14:50:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdunneuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Post date:** [May 23, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/help-with-text-replacement-plugin/168648/1 "2009-05-23T14:50:29Z")

</div>

Hi guys,

I thought of having a plugin which replaces text with the tag of an  
image (f.e. ‘read’ =\> ‘ ![]()’) would be great.

I started with to create this plugin, but I didn’t get far. Is there  
anyone who can help me with this? My idea is to have all ‘translations’  
in a \*.yml file. But I don’t know how to load this file from the plugin  
and how to store the values in an array.

If someone would like to help with this small but handy plugin, please  
let me know. I’ll put my stuff on github then.

Thanks a lot in advance.

-patrick

---

<div class="post-metadata">

**Author:** ![jdunneuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Post date:** [May 23, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/help-with-text-replacement-plugin/168648/2 "2009-05-23T17:31:17Z")

</div>

solved.

[http://github.com/pathe/replacr/tree/master](http://github.com/pathe/replacr/tree/master)

---

<div class="post-metadata">

**Author:** ![jdunneuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Post date:** [May 23, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/help-with-text-replacement-plugin/168648/3 "2009-05-23T18:46:50Z")

</div>

> If someone would like to help with this small but handy plugin, please  
> let me know. I’ll put my stuff on github then.

A well crafted gsub can do that easily.
