Answers.Body: <p>Try something like </p>
  
  <pre><code>{{ (entry.body | slice(0, 500) ~ '...') | markdown }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T19:40:53.667Z
Answers.Text: This is probably really close, but it's not converting it to markdown. Is there a smarter way of outputting the Rich Text's content?
Answers.UserDisplayName: jasonetco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T19:51:42.733Z
Answers.Text: This works perfectly: `{{ (entry.body | slice(0, 500) ~ '...') | markdown }}`
Answers.UserDisplayName: jasonetco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T19:24:55.293Z
Answers.LastActivityDate: 2016-03-19T21:39:00.810Z
Answers.LastEditDate: 2016-03-19T21:39:00.810Z
Answers.UserDisplayName: Seán O'Grady
Answers.Body: <p>You might find the Hacksaw plugin useful for this <a href="https://github.com/ehousestudio/craft_hacksaw/" rel="nofollow">https://github.com/ehousestudio/craft_hacksaw/</a> this will truncate text for you and has a wealth of options available for doing so, specifically the <code>append</code> parameter, which will do exactly what you want :)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T19:41:25.153Z
Answers.Text: Cool, thanks! I'd rather not use a plugin, but this will be my back up answer :)
Answers.UserDisplayName: jasonetco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-19T19:23:56.453Z
Answers.LastActivityDate: 2016-03-19T19:23:56.453Z
Answers.UserDisplayName: Alec Ritson
Body: <p>I'm using the following code in my template to truncate the body of an entry (coming from a Rich Text field):</p>
  
  <p><code>{{ entry.body | slice(0, 500) | markdown }}</code></p>
  
  <p>To this, I'd like to add <code>...</code> as a string, so that it will output like:</p>
  
  <p><code>Words words words...</code></p>
  
  <p>Since the field part I'm using outputs into its own <code>&lt;p&gt;</code> tag, adding the <code>...</code> into the HTML itself has them sitting in two different tags. I've tried using <code>|join</code> but I must be doing something wrong, its putting the first part into a separate <code>&lt;p&gt;</code> tag than the <code>...</code></p>
  
  <p>Thanks for your help!</p>
  
Tags: <templating><filter>
Title: Add '...' to template field
ThreadText: # Add '...' to template field
  
  (Asked by: username_0 on 2016-03-19)
  
  I'm using the following code in my template to truncate the body of an entry (coming from a Rich Text field):
  
  `{{ entry.body | slice(0, 500) | markdown }}`
  
  To this, I'd like to add `...` as a string, so that it will output like:
  
  `Words words words...`
  
  Since the field part I'm using outputs into its own `<p>` tag, adding the `...` into the HTML itself has them sitting in two different tags. I've tried using `|join` but I must be doing something wrong, its putting the first part into a separate `<p>` tag than the `...`
  
  Thanks for your help!
  
  **Tags:** templating, filter
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-03-19. Score: 2 | Accepted answer
  
  Try something like
  
  ```
  {{ (entry.body | slice(0, 500) ~ '...') | markdown }}
  
  ```
  
  > **Comments:**
  > **username_0**: This is probably really close, but it's not converting it to markdown. Is there a smarter way of outputting the Rich Text's content?  
  > **username_0**: This works perfectly: `{{ (entry.body | slice(0, 500) ~ '...') | markdown }}`  
  
  ---
  
  ### Answer by username_2 on 2016-03-19. Score: 3
  
  You might find the Hacksaw plugin useful for this <https://github.com/ehousestudio/craft_hacksaw/> this will truncate text for you and has a wealth of options available for doing so, specifically the `append` parameter, which will do exactly what you want :)
  
  > **Comments:**
  > **username_0**: Cool, thanks! I'd rather not use a plugin, but this will be my back up answer :)  
  
  ---
  
  