Opened 14 years ago

Closed 12 years ago

#7585 closed New Feature (duplicate)

Get Plain Text

Reported by: eng.melegy Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: 3.0
Keywords: Cc: eng.melegy@…

Change History (2)

comment:1 Changed 13 years ago by Jakub Ś

Description: modified (diff)
Keywords: Get Plain Text removed
Status: newconfirmed
Version: FCKeditor 2.6.63.0

To get Text from a single element you can use getText() method. Please see here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#getText

If you are talking about getting text from whole page than I think we could create a plug-in that moves down the DOM tree gets text from elements and returns nice plain line of text.

On the other hand I’m not sure if this road is not to slippery. Someone might say that plain line is ok, someone else that ok this is plain text but headers should be in one line a the rest of the text that follows in the other. Someone else might say that when one text ends with a space and the other text begins with it, one of spaces should be removed, someone else might say that they should be felt untouched. Someone might say that some tags should be omitted… and so on.

Perhaps the best solution is to leave this to the user to create a simple plug-in/function which moves down the DOM tree, gets the text from elements and returns it in the form that he/she wants?

comment:2 Changed 12 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

DUP of #849

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy