Disable markdown and buttons in form


(benjamin_bnds) #1

Is it possible to disable markdown and buttons in the form to create/edit a topic/response?


(Jeff Atwood) #2

You can disable the buttons via CSS (set them to display:none) in Admin, Customize, CSS.

#wmd-button-bar { display: none; }


(benjamin_bnds) #3

Thank you. But Markdown parsing will still be working.

Can we also disable it?


(Kane York) #4

Uh, I think you could do that with a dialect, but why?

Your newlines wouldn’t work anymore (HTML will turn them into spaces), and people could still type HTML to get formatting.

This is an odd request - what do you actually want?


(benjamin_bnds) #5

Indeed, for my project I think that allow only newlines and links will be great, but I don’t want to allow bold, italic, etc.


(Kane York) #6

How about turning them off with CSS?

.cooked {
  b, strong {
    font-weight: normal;
  }
  i, cite, em, var, address, dfn {
    font-style: normal;
  }
  // .....
}

(benjamin_bnds) #7

Smart idea! Thanks I didn’t think about it.


(benjamin_bnds) #8

Do you know how I can disable markdown only for users/visitors but enable it for administrators? I don’t find any CSS tip to do it.


(cpradio) #9

You can’t do that via CSS. Markdown has nothing to do with CSS. I’m not sure why you’d want to do this to begin with. Why do you not want your users to format their content with markdown?

Are you afraid they’ll abuse it? Not know how to use it?


(benjamin_bnds) #10

Look at the all conversation and you will understand why I’m talking about CSS tip.


(cpradio) #11

Yes, and that’s a “clever” option, but I still don’t get it the “why”


(benjamin_bnds) #12

Actually you’ve got the point :wink: