# Formatting toolbar

**URL:** https://meta.discourse.org/t/formatting-toolbar/40649
**Category:** Plugin
**Created:** [3월 6, 2016, 12:39오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649 "2016-03-06T12:39:23Z")
**Posts on this page:** 20
**Page:** 6

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [11월 29, 2018, 12:07오전 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/108 "2018-11-29T00:07:47Z")

</div>

New version available, I fixed the incompatibility of some icons with the latest version of Discourse (that includes FontAwesome 5).

It was easier that I thought, **but if you have any issue, let me know**

I also changed the icon of the color’s button : instead of the paint brush, we will use the palette. Here are all the icons available:

> ![](https://global.discourse-cdn.com/meta/original/3X/6/b/6b3df881600a0ef02c0e7367fcf6968507b3a5f8.jpeg)

I think it suits the button better.

* * *

If you have a fork on this plugin with custom buttons, the update is pretty easy, you just have to edit your plugin.rb file (example : line 20 to 27 : [discourse-formatting-toolbar/plugin.rb at master · MonDiscourse/discourse-formatting-toolbar · GitHub](https://github.com/iunctis/discourse-formatting-toolbar/blob/master/plugin.rb))

You have to register any icon you use. Search for your icon here : [Find Icons with the Perfect Look & Feel | Font Awesome](https://fontawesome.com/icons?from=io)

If the icon is in ‘solid’ category, add :  
`register_svg_icon "fa-icon_name" if respond_to?(:register_svg_icon)`  
ex : `register_svg_icon "fa-underline" if respond_to?(:register_svg_icon)`

If the icon is in ‘regular’ category, add  
`register_svg_icon "far-icon_name" if respond_to?(:register_svg_icon)`  
ex : `register_svg_icon "far-address-book" if respond_to?(:register_svg_icon)`

If the icon is in ‘brand’ category, add  
`register_svg_icon "fab-icon_name" if respond_to?(:register_svg_icon)`  
ex : `register_svg_icon "fab-apple" if respond_to?(:register_svg_icon)`

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 3, 2019, 8:12오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/109 "2019-01-03T20:12:45Z")

</div>

I just installed the plugin on the v2.2.0.beta7 and i have a problem: line spacing between paragraphs collapse when using text formatting: [right], [left], [center], [justify]

See the following example:

 ![Just_001](https://global.discourse-cdn.com/meta/original/3X/a/8/a88774598c28db5765c6823faa2e03a86748a783.jpeg)

The preview on the right window is correct. But then… see next post

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 3, 2019, 8:13오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/110 "2019-01-03T20:13:35Z")

</div>

![Just_002](https://global.discourse-cdn.com/meta/original/3X/0/1/01f490a9edae536de012bdea9cedac9c0f445597.jpeg)

After Reply, the text appear correctly first, but after 1-2 seconds the line spacing between the two paragraphs collapses.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [1월 3, 2019, 9:30오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/111 "2019-01-03T21:30:51Z")

</div>

Thanks for the feedback, I pushed a fix. Let me know if it works well

For the previous posts, you might need to do a Rebuild HTML to update the code.

> ![image](https://global.discourse-cdn.com/meta/original/3X/c/a/cae7abd03e0b6c2dd898b0c2bec74638c6473860.png)
> 
> ![image](https://global.discourse-cdn.com/meta/original/3X/a/e/aea04c12acc3514b8d8e7f9715703008f0a6fa4b.png)

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 3, 2019, 9:40오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/112 "2019-01-03T21:40:55Z")

</div>

Hi Steven.  
No, it doesn’t work. After rebuilding HTML line spacing disappears after a fraction of a second.

 ![2qbhia](https://global.discourse-cdn.com/meta/original/3X/6/1/61810af9f4795b40f9396afe628fbb47589d1c28.gif)

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 3, 2019, 10:13오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/113 "2019-01-03T22:13:27Z")

</div>

My fault! After rebuilding app it works. Thank you Steven.

I love this plugin.

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 20, 2019, 2:54오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/114 "2019-01-20T14:54:36Z")

</div>

I found another bug. After justifying the text there is an additional line spacing. I’m working with V2.2.0.beta8.

 ![Bug](https://global.discourse-cdn.com/meta/original/3X/a/0/a07f176a2091cfd2753669b7acdd0f81b0837f2d.gif)

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [1월 20, 2019, 3:57오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/115 "2019-01-20T15:57:21Z")

</div>

The behaviour is different from the preview and the cooked post (on preview, it adds the `<p>` tags for each bbcodes, not on cooked), I don’t really know where it comes from, I don’t know if it’s something I can fix on my part

edit : wait I have an idea, I can fix it in a few hours

---

<div class="post-metadata">

### Author: ![AndreaG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreag/32/128054_2.png) [@AndreaG](https://meta.discourse.org/u/AndreaG)
#### Post date: [1월 20, 2019, 4:40오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/116 "2019-01-20T16:40:32Z")

</div>

Hi Steven, if I put only one `[right]` in the first line and a `[/right]` at the end of the last line, it works correctly.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [1월 20, 2019, 5:06오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/117 "2019-01-20T17:06:21Z")

</div>

I did a little upgrade to prevent this different behaviour between preview and cooked post. I should have thought about that before 🤦‍♂️

I’ll check the source of the bbcodes later, maybe I can do something better than a css fix, but it should be good for now

Thanks for your feedbacks

---

<div class="post-metadata">

### Author: ![orchardstreet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/orchardstreet/32/149531_2.png) [@orchardstreet](https://meta.discourse.org/u/orchardstreet)
#### Post date: [9월 3, 2019, 2:18오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/118 "2019-09-03T14:18:15Z")

</div>

how is it recommended to clear a left or right float?

“clear:both;” in a div tag does not seem to work

Also any advice on floating or centering a youtube embed?

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [9월 3, 2019, 7:50오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/119 "2019-09-03T19:50:44Z")

</div>

I can create a clear bbcode, I did it on a customized version of this plugin, I will add it to the official.

It will be `[floatc][/floatc]`, with a _clear: both_ css code attached to it

edit :

[https://github.com/iunctis/discourse-formatting-toolbar/commit/b52c9c4312d869edb33390eea8b7027a4127504a](https://github.com/iunctis/discourse-formatting-toolbar/commit/b52c9c4312d869edb33390eea8b7027a4127504a)

* * *

Regarding the youtube embed, You can try add a line between the bbcodes and the link

![image](https://global.discourse-cdn.com/meta/original/3X/9/b/9b91c94ccbea6174adb9f8bcfdefdc68745d98b3.png)

It should work on preview and cooked post

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [9월 11, 2019, 1:22오전 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/120 "2019-09-11T01:22:55Z")

</div>

in mobile layout error

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/2/72f251a5e6c56de91523148458115ed5bf4fb6a5.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/d/eda6b53e0c60a91dc7cdf9844ffd66fb7304fb1d.png)

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [9월 11, 2019, 9:00오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/121 "2019-09-11T21:00:16Z")

</div>

I don’t exactly see the issue, can you clarify a little please

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [9월 13, 2019, 4:47오전 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/122 "2019-09-13T04:47:23Z")

</div>

I mean tools post outsite.

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/a/8a2e3dc0bfbad01ce4f65345bbb36a3864e22ac4.png)

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [9월 13, 2019, 8:05오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/123 "2019-09-13T20:05:57Z")

</div>

edit : Oh I see what’s wrong, I’ll fix it immediately, check the updates @Bank_Live

I need to edit the css that cause this issue.

edit : It is fixed now, thanks for reporting!

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [9월 27, 2019, 10:45오전 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/124 "2019-09-27T10:45:41Z")

</div>

discourse-formatting-toolbar

이 플러그인이 현재 작동하지 않는 것 같습니다.

설치도 했고 실행도 했지만 아무 반응이 없습니다. 웹페이지를 새로고침해도 여전히 아무 일이 일어나지 않습니다. 색상 버튼을 활성화했지만 역시 아무 반응이 없습니다.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [9월 27, 2019, 12:40오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/125 "2019-09-27T12:40:04Z")

</div>

사용 중인 Discourse 버전은 무엇인가요?

가장 빨리 확인해 보겠지만, 플러그인을 깨뜨릴 수 있는 Discourse 커밋은 없는 것 같습니다.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [9월 27, 2019, 7:17오후 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/126 "2019-09-27T19:17:27Z")

</div>

방금 확인해 보았는데 여기서는 문제가 없습니다.

어떤 플러그인을 사용 중이신가요?

BB코드에 16진수 색상 코드를 추가하고 계신가요? 예: `[color=#ff3300]Text[/color]`

---

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [9월 29, 2019, 2:43오전 UTC](https://meta.discourse.org/t/formatting-toolbar/40649/127 "2019-09-29T02:43:11Z")

</div>

설치 완료  
2.4.0.beta4  
([8adec48b33](https://github.com/discourse/discourse/compare/8adec48b335b8cdf3ee7d674e0075f7f461e3a97...tests-passed))

이상하네요. 서식 도구 모음이 활성화되지 않은 것 같습니다.

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/5/956c68ebedebbe4cd6de7452ff7c0eb0328f37bb.png)

하지만 활성화되어 있어야 합니다.

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/1/0136f80bee90c55692dddee9b18411d706610113.png)

[이전 페이지](https://meta.discourse.org/t/formatting-toolbar/40649.md?page=5)

[다음 페이지](https://meta.discourse.org/t/formatting-toolbar/40649.md?page=7)
