Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-04-09 16:15:13

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Paste plain text

Anyone know what the best way is to do a paste as plain text?

(so you can copy from a page with messed up tables/html and paste just the text from it)

Thanks

Last edited by willeffects (2005-04-10 15:09:44)

Offline

#2 2005-04-11 03:10:49

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Paste plain text

wouldn't it be a good idea to have a "paste as text" toolbar-button?
that does exactly waht will wants big_smile

(currenlty i could switch to html-code-view and paste there)


Niko

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#3 2005-04-11 15:58:13

riftdesign
Xinha Pro
From: South Dakota, USA
Registered: 2005-03-22
Posts: 55
Website

Re: Paste plain text

If you have Firefox, you can get the excellent "Copy as Plain Text" extention:
https://addons.update.mozilla.org/exten … php?id=134

I love it!


rift design studio
[url]http://www.riftdesign.com[/url]

Offline

#4 2005-04-12 02:03:43

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

I can paste as plain text but I need all the users to be able to smile  And yes if I can figure out a way to do it I was planning on doing a toolbar button.  I thought there was a function but I looked through the function list and didnt see one.

Offline

#5 2005-04-12 05:59:30

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Paste plain text

The problem with paste (plain text or otherwise) is that you won't be able to do it in Firefox from a toolbar button, the only way (without adjusting browser settings manually) is to CTRL-V or select edit>paste


James Sleeman

Offline

#6 2005-04-12 06:42:14

adamp
Xinha Pro
Registered: 2005-03-14
Posts: 77

Re: Paste plain text

I don't know if you can catch pasted text as it's being pasted via ctrl+v, but if yes then a slightly convoluted way would be to have a toolbar button that turns on plain text pasting (sets a variable) and then any pasted text gets stripped of tags, etc. or run through the Word cleanup/any other function you want.

Not fool-proof and not ideal but it might be one way smile

Offline

#7 2005-04-13 03:52:17

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Paste plain text

The only way of doing it would be to snapshot the html before the paste, paste, then diff the snapshot and the current to work out what was added, pull that out, strip it appropriatly, put it back in etc... in other words, it's just not realisitically possible.


James Sleeman

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 717

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#8 2005-04-13 12:21:29

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Paste plain text

gogo wrote:

The only way of doing it would be to snapshot the html before the paste, paste, then diff the snapshot and the current to work out what was added, pull that out, strip it appropriatly, put it back in etc... in other words, it's just not realisitically possible.

I believe that FCKeditor impliments this function. I am unsure as to how though (I only tried an online demo).
http://www.fckeditor.net

Last edited by KaplanDigital (2005-04-13 12:22:17)

Offline

#9 2005-04-13 15:19:57

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

In FF I always get "undefined" when I click on anything that has a popup in FCKeditor.  Thats the reason I went with xinha smile

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 717

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#10 2005-04-13 16:34:17

KaplanDigital
Xinha Community Member
Registered: 2005-04-04
Posts: 22

Re: Paste plain text

willeffects wrote:

In FF I always get "undefined" when I click on anything that has a popup in FCKeditor.  Thats the reason I went with xinha smile

That is odd. I did not experience that problem when I tried the demo (Both in FF and IE). I went with Xinha because of its fullscreen function.

Offline

#11 2005-04-13 19:18:32

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

I might be because im using tabbrowser extensions or something, but if it doesnt work for me theres going to be more then enough users sending me emails about it.

I also didnt like the lag of FCK.  It seems when you mouse over a menu or even loading it, it takes a while to respond.  Xinha is much quicker (thought much less developed at this point).

We had another problem when loading images from multiple editors on the same page.  Most other editors have this same bug.  Xinha was one of the only ones that does not.

I wonder if xinha would get more development being on sourceforge?

Will

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 717

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#12 2005-04-14 00:38:31

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Paste plain text

Will,

Xinha is much quicker (thought much less developed at this point).

could you perhaps write a list (just post here) of things that FCK has that we don't (and should)? 

I wonder if xinha would get more development being on sourceforge?

I doubt it, SF doesn't support subversion repositories, or trac or anything nice like that anyway.  There are a number of developers (including myself) who have access to commit to the subversion repository for Xinha, anybody who wants to do so need only ask me (and show me a patch they want to commit first so I know they are at least a little bit conversant with Javascript).


James Sleeman

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 717

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#13 2005-04-14 01:41:14

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

could you perhaps write a list (just post here) of things that FCK has that we don't (and should)?

sure just fyi I tested the following editors for over a month before deciding to go with Xinha:

1. Kevin Roths
2. TinyRTE
3. TinyMCE
4. wysiwygPRO
5. FCKeditor
6. p42.net's
7. HTMLarea

Xinha was the only one that could do what we needed (to build an online tutorial system).  It exploits bugs in every other editor that prevents full use.  I will reference features from some of these:

1. (HIGH PRIORITY) Get ENTER to work correctly in IE
2. Popups in Div's.  (FCK, wywisygPRO)
3. Unlink button
4. Search and Replace
5. Paste from word (instead of cleaning tags) (I like the way wysiwygPRO does this best)
6. Paste as plain text
7. Having source/editor in tabs at the bottom (wysiwygPRO)

i'll fill in more later.


I doubt it, SF doesn't support subversion repositories, or trac or anything nice like that anyway.  There are a number of developers (including myself) who have access to commit to the subversion repository for Xinha, anybody who wants to do so need only ask me (and show me a patch they want to commit first so I know they are at least a little bit conversant with Javascript).

But cant you just create a link from there to get more exposure?  Not actually use their system.  I've tested them all and xinha is the best but I know lots of people dont know about it.

Will

Last edited by willeffects (2005-04-14 01:54:06)

Offline

#14 2005-04-15 03:15:00

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Paste plain text

...i just tried out the paste-solution for mozilla FCKeditor has...
VERY, VERY nice i must say!
we should copy the idea imho big_smile

in short:
if a FF-user clicks the paste-as-text-button, a popup opens with a textarea where the user can paste (using ctrl+v) and then click ok. then the editor will insert the pasted-content as text!


Niko

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 717

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#15 2005-04-15 07:12:39

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Paste plain text

niko wrote:

...i just tried out the paste-solution for mozilla FCKeditor has...
VERY, VERY nice i must say!
we should copy the idea imho big_smile

in short:
if a FF-user clicks the paste-as-text-button, a popup opens with a textarea where the user can paste (using ctrl+v) and then click ok. then the editor will insert the pasted-content as text!

Didn't think of doing it that way, simple and effective I guess.


James Sleeman

Offline

#16 2005-04-16 01:16:53

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

This is the way wsywiygPRO does paste as word.  Which allows it to be run through a php filter I believe.  Yes this is a very nice way to do it.

Offline

#17 2005-05-08 03:02:53

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Paste plain text

Could somebody submit a feature request for this please smile


James Sleeman

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#18 2005-05-10 03:22:11

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Paste plain text


Niko

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#19 2005-06-18 01:33:49

paulb
Xinha Community Member
Registered: 2005-04-27
Posts: 12

Re: Paste plain text

I've implemented a version of this - see ticket #349 (http://xinha.python-hosting.com/ticket/349). 
It will do the popup for Firefox, and if you have killWordOnPaste turned on, it will strip all style
formatting from the pasted text.  It might need some tuning for more general use, I dont know. 
For example, users might want to choose whether they want to strip the formatting from pasted
text, so there could be a checkbox to allow you to turn off the "word kill".  For those who are
interested, please give it a try and let me know what you think!

Paul Baranowski

Offline

#20 2005-06-19 18:27:08

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: Paste plain text

I will give this a shot as soon as I get a chance.

Thanks!
Will

Offline

#21 2005-06-21 15:27:32

Air
New member
From: NYC
Registered: 2005-06-15
Posts: 9

Re: Paste plain text

Would this eliminate Word style Smart Quotes as well?  Having some trouble with that today.

Hopefully I'll play with this later - looks great!

Offline

#22 2005-06-21 19:37:01

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: Paste plain text

Ticket 127 should fix Word style quotes.

Offline

#23 2005-06-22 14:17:40

g2010a
New member
Registered: 2005-03-28
Posts: 9

Re: Paste plain text

Is anyone having a hard time getting the hack on ticket 349 to run? It seems like something breaks when I try to run it.  Javascript console has nothing to say about the problem...

Offline

#24 2005-06-22 14:23:18

paulb
Xinha Community Member
Registered: 2005-04-27
Posts: 12

Re: Paste plain text

Which browser?  Can you put in some alert statements in the constructor and in the function to see if they are called?  I am around the next two days to help, then going on vacation for a few weeks.

Offline

#25 2005-06-22 14:41:48

paulb
Xinha Community Member
Registered: 2005-04-27
Posts: 12

Re: Paste plain text

...and did you modify the HTMLArea.js file as well?

Offline

Board footer

Powered by FluxBB