Trix: Get plain text content

Created on 17 Aug 2017  路  2Comments  路  Source: basecamp/trix

Can I get the content plain text? I want to save 2 versions of the written content, one formatted as it is today and another plain text (to make text actions on it like text extraction, language identification and more)

Steps to Reproduce

Current saved text is: "

Hello world
Content
  1. List one
2. List two
"

And I want to save also the plain text version:
Hello world
Content
List one
List two

Is it possible?

Details
  • Trix version: Latest
  • Browser name and version: Chrome Latest
  • Operating system: Windows

Most helpful comment

Yes, you can convert the Trix.Document to a string with: element.editor.getDocument().toString()

screen shot 2017-08-17 at 6 41 02 am

All 2 comments

Yes, you can convert the Trix.Document to a string with: element.editor.getDocument().toString()

screen shot 2017-08-17 at 6 41 02 am

Yes, you can convert the Trix.Document to a string with: element.editor.getDocument().toString()

screen shot 2017-08-17 at 6 41 02 am

Where to edit this changes?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atuttle picture atuttle  路  4Comments

marpstar picture marpstar  路  5Comments

adamdebono picture adamdebono  路  3Comments

divyenduz picture divyenduz  路  3Comments

plainspace picture plainspace  路  4Comments