1

I am currently customizing Telescope heavily, which is written in Meteor.

I need to go over the 3,000 character defined in Telescope's Posts schema's body defined here in the source.

I've been able to customize the HTML and JS, but not the models. How would I do so?

Naoto Ida
  • 1,275
  • 1
  • 14
  • 29

1 Answers1

3

Just create a file under your lib folder and use the documentation here: http://docs.telescopeapp.org/docs/custom-fields to remove or add fields to that Schema.

EDIT: Sorry, but reading carefully your comment I understood you want to modify the autoForm props rather than the Schema itself. To change the maximum allowed value, do something along these lines:

Posts.removeField("body");
Posts.addField({
  fieldName: 'body',
  fieldSchema: {
    type: String,
    optional: true,
    max: 5000,
    editableBy: ["member", "admin"],
    autoform: {
      placeholder: 'Cannot exceed the maximum length of 5000 characters',
      row: 10,
      type: 'textarea'
    }
  }
});
Radu Chiriac
  • 1,374
  • 3
  • 18
  • 34
  • Thanks, but I've been able to add custom fields, it's more about overriding the current condition of 3,000 character limit. – Naoto Ida Dec 16 '15 at 08:43
  • Sorry, but I think I did with "I need to go over the 3,000 character defined in Telescope's Posts schema". Thanks for the answer though! – Naoto Ida Dec 17 '15 at 03:28