Difficulty using the code tag </>


(gingerling) #1

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:


(Jakob Borg) #2

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.


(gingerling) #3

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

a
x


(Sam Saffron) #4

This needs to be a switch, desirable on programming communities


(gingerling) #5

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


(Sam Saffron) #6

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


(gingerling) #7

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?


(Sam Saffron) #8

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


(gingerling) #9

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:


(Michael Downey) #10

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:


(gingerling) #11

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:


(Jeff Atwood) #12

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.


(gingerling) #13

Will follow this Discourse Meta instead


(Arpit Jalan) #14

This is now done via:


(Arpit Jalan) #15