# איך להחליף טקסט במלחין?

**URL:** <https://meta.discourse.org/t/how-to-replace-text-in-the-composer/159526>\
**Category:** Development\
**Created:** [1 באוגוסט,‏ 2020,‏ 3:52pm UTC](https://meta.discourse.org/t/how-to-replace-text-in-the-composer/159526 "2020-08-01T15:52:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Newuser](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/newuser/32/184725_2.png) [@Newuser](https://meta.discourse.org/u/Newuser)\
**Post date:** [1 באוגוסט,‏ 2020,‏ 3:52pm UTC](https://meta.discourse.org/t/how-to-replace-text-in-the-composer/159526/1 "2020-08-01T15:52:52Z")

</div>

Hi all,

I have a very simple question, but I can’t find the answer anywhere.  
I want to create custom BBcode without a closing tag, how do I do that?

Thanks to this topic I already figured out how to replace [something]something else[/something] with html code.

> [@Custom BBCode Help/Advice](https://meta.discourse.org/t/custom-bbcode-help-advice/84005):
>
> UPDATE: Figured it out! I’m trying to make make a plugin that makes a custom bbcode that maps [vote]name[/vote] to \<p\>\<span class="highlight"\>\<b\>VOTE:name\</b\>\</span\>\</p\> I’ve been reading the stuff in [this topic](https://meta.discourse.org/t/developers-guide-to-markdown-extensions/66023) along with going through the various bbcode plugin repos that exist, and If I’m understanding the examples correctly the only relevant nontrivial places I have to change would be the stuff after wrap here ruler.push('vote',{ tag: 'vote', wrap: }); and the stuff in squ…

But now I would like to find out how to just replace [something]. For instance, I would like to know how to replace [br] with \<br\>. Or just any substring (not containing a closing tag) with something else. I already looked at the source of the discourse-bbcode plugin, but every bbcode in that plugin has a closing tag.

Basically I am looking for something like this:

> [@(Superseded) Plugin Tutorial #1 - How to manipulate the text in the composer?](https://meta.discourse.org/t/plugin-tutorial-1-how-to-manipulate-the-text-in-the-composer/10925):
>
> information_source This topic has been superseded by [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/developing-discourse-plugins-part-1-create-a-basic-plugin/30515) So, you want to manipulate the text in the composer but have no idea how? Let met guide you through the creation of a basic plugin that will turn the text into [Pirate Speak](http://en.wikipedia.org/wiki/International_Talk_Like_a_Pirate_Day). tada Update August 2018: you can create a complete discourse plugin skeleton in your plugins directory with [Rails plugin generator](https://meta.discourse.org/t/rails-plugin-generator/95907) tada First of all, you need to create a plugin.rb file that will b…

But then something that still works.  
Can someone help me or point me in the right direction?

---

_[View the full topic](https://meta.discourse.org/t/how-to-replace-text-in-the-composer/159526)._
