wolfv / silverstripe-markdowneditorfield

15 stars 4 forks source link

Question about field property #4

Open graphicagenda opened 12 years ago

graphicagenda commented 12 years ago

Does MarkdownField Editor work with Varchar(255), HTMLText, and Text fields correctly, or reserved for only one type property?

wolfv commented 12 years ago

It inherits from TextArea Field if I remember correctly. I am not exactly sure if TextAreaField works with Varchar(255), but I guess so.

However, I feel that it would be right to use the Markdown Field only on a text object, because you really get quite a big field.

However, if you want to add some markup to titles or so, you could use a Varchar(255) field, use a generic TextField and let it go through the parser on the template.

https://github.com/anselmdk/silverstripe-markdowneditorfield-extensions/blob/master/code/MarkdownComboPage.php

This is an example, where you can see the general usage :)

graphicagenda commented 12 years ago

Found out the textparser only works for Text fields.

wolfv commented 12 years ago

well, too bad ...

what exactly do you want to achieve? you could use the php-markdown-extra class directly in a getFieldName() function ... if you tell me more, I might be able to help you out.

Cheers, Wolf

graphicagenda commented 12 years ago

oh, it was bad question on my part, I should've educated myself on the original TextParser class. but i'm opening a new issue, which isn't a question, but I'd like you to check it out.