LEFapps / lef-translations

meteor wrapper for @lefapps/translations
MIT License
0 stars 0 forks source link

Do not rely on 'md' in collection #4

Closed johanlef closed 5 years ago

johanlef commented 5 years ago

Only the prop md decides if the text is rendered with markdown true or plain false.

Note: there are two things to keep in mind

  1. Changing a translation field from plain text to md or vice versa has no effect, unless the translation document is also changed.
    // translation component is plain text
    <Translate _id={'text'} />
    // When changed to md, it currently stays plain text ☹️ 
  2. The md field must be saved in the collection. When editing a translation, the source component is not present to determine if a translation is md or not. The editor is different for md and non-md fields.