Difficulty using the code tag </>

Hi

On discuss.phpList.org our users are having issues with the code tag. There seem to be two methods of using it

  1. paste in your code, select it, and click the code tag - that works fine
  2. Click the code tag and paste your code - this does not work

First of all, clicking the code tag says “indent preformatted text by 4 spaces” which is selected, persumably so if you paste it replaces it? This is very counter-intuitive, perhaps “paste your code” could be more helpful? Secondly, when you then paste the code, the formatting seems to be wiped anyway, so the code tag does not work. Perhaps I am misunderstanding something here?

method 1) is quite cumbersome, so I assumed method 2 was the intended use.

Anyway, there has been a long served forum mod who has struggled with this some much he just stopped modding :confused:

Yeah people seldom seem to get it right. If that button made a section

paste your code here

i.e. triple backtick fencing with the sentence in the middle selected, that would be more foolproof.

4 Likes

Do you know what the exact method for 2) is supposed to be? Is it actually supposed to work that way?

a
x

This needs to be a switch, desirable on programming communities

1 Like

so, what, switch it on, paste code, switch it off?

A site setting that admins enable on programming communities that changes the way </> behaves, on your php community it should insert.

```
paste code
```

Of course to make all this happen someone needs to hack up the editor and add the site setting, but we are totally open for a PR there

1 Like

Unfortunately we don’t have the skills for that, or at least, not if it’s in Ruby. How much would it cost to pay Discourse core staff to implement it?

If you sign up for our standard hosting I will build the feature for you :innocent:

1 Like

Ah, we are all hosted already buddy (we have a full time sys-admin so he does all that stuff). We are not against paying for custom work when we can afford it though - especially if it keeps our mods happy :slight_smile:

1 Like

I know it doesn’t fit with the current business model but there is a case to be made for a bug/feature bounty marketplace, particularly for those of us who self-host. :wink:

1 Like

As a community manager my advise is this: do it or someone else will do it somewhere else and less well. That someone else gets to dictate the business model, you lose a chunk of your community and the much of the power to guide the way your community works.

Just look at WordPress, how much have they lost out to the theme and plugin stores etc. By the time they added a “donate” button to the .org themes store it was far too late, many of the serious developers had moved on already. They have ended up with a lot of questionable business models dominating the way their community works. Who ever thought we would see the nasty old licence activation key back in Open Source? And freemium themes that fill peoples installs with ugly adds and malware.

If they had added a variety of appealing ways for developers to make some money and users to pay for some work earlier on, everyone would have benefited.

If you think that the need for some kind of paid development mechanism is on the rise in discourse, then you have a window of a nice few years to get ahead of the curve before the community carpet baggers come in :wink: :smile:

2 Likes

One of the easiest ways to sponsor first party development is to take a hosting contract with us. At the Business and (more so) the Enterprise level we can build new features or feature enhancements for our customers, as long as they are useful to lots of other Discourse instances.

Will follow this https://meta.discourse.org/t/how-to-sponsor-3rd-party-development-on-discourse-core/31228 instead

This is now done via:

5 Likes