Opened 17 years ago
Last modified 12 years ago
#849 confirmed New Feature
Get the "plain text" (tags stripped) content from the editor
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
I want to get the pure content,i.e. the value of the editor discarding all the tags related to format, such as html tags or javascript tags. In other word, I need not the html source in the editor but the all text displayed on the html page without any tags.
A new method is desirable to implement such a function.
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1371816&group_id=75348&atid=543656
Change History (8)
comment:1 follow-up: 2 Changed 17 years ago by
Cc: | Frederico Caldeira Knabben Alfonso Martínez de Lizarrondo added |
---|---|
Reporter: | changed from Martin Kou to anonymous |
comment:2 Changed 17 years ago by
I've got this same problem to. I use FCK in a mailing editor, and so getting plain text and html values are mandatory (sending in multipart/alternative). For now I use lots of regexp to do the job (if FormatOuput is set to true this is a real nightmare). A FCK API method would be greatly appreciate !
comment:3 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
As mentioned above to get the plain text is better to use a normal textarea. FCKeditor is build to change the text to html code so I don't see it changing in that sense.
comment:4 Changed 17 years ago by
Cc: | Frederico Caldeira Knabben Alfonso Martínez de Lizarrondo removed |
---|---|
Keywords: | Confirmed added |
Resolution: | wontfix |
Status: | closed → reopened |
Even if in the fair past this the idea didn't caught my mind properly, the situation proposed by pgoiffon is a reality. So, the request is not totally wrong.
I don't think we would ever have a core function for that, but it fits well in a plugin. Let's leave this request opened just for reference.
comment:5 follow-up: 6 Changed 15 years ago by
Another use case I've just saw in a newsgroup : a char counter... that would counts only the characters the user has typed, and no html tags or indentation space.
With that content : <p>
Hello <b>World</b>
</p> The counter should return 11 characters (the length of the string "Hello World").
comment:6 Changed 15 years ago by
comment:7 Changed 12 years ago by
Keywords: | SF Confirmed removed |
---|---|
Status: | reopened → confirmed |
Version: | → 3.0 |
Getting text from whole page - 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 or perhaps a text with line-breaks.
Another approach would be using regular expressions on data from getData()
method.
I think that's useful.
Moved from SF. Original poster: Anonymous
I am needing the same exact thing!!! We are developing for people who dont know web so it would be nice for them to have a paste-from web page option
Moved from SF. Original poster: Anonymous
It may be useful in order to send emails with both HTML and text versions with only one FCKeditor input.
Moved from SF. Original poster: Anonymous
Take a look at the "GetLength()" function in the sample08.html file.
Moved from SF. Original poster: fredck
You can do it getting the current output and processing it with a regexp, but I don't see any value of using this editor to get the plain text. To get plain text is easier to use a textarea.
Moved from SF. Original poster: alfonsoml