MS Word Paste and comments
MS Word Paste and comments
A few of my readers have had this problem. When pasting from MS word into the comments section, it puts into office specific tags which in turn cause the comments texts layout to go haywire.
I am just wondering if there is a way to strip out MS word specific tags on pasting?
I am just wondering if there is a way to strip out MS word specific tags on pasting?
Eddie Traversa
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: MS Word Paste and comments
Wow. I've never ever heard of people who paste Word-stuff as comments!
The problem is that very deep in the code we make a strip_tags call. That removes all HTML markup formatting. Basically it shouldn't scrubb out any text information. Can you give me an example of what your people paste?
I think that Word has a feature to copy code as plaintext...but I bet that's too hard for your users to figure out. :-/
Regards,
Garvin
The problem is that very deep in the code we make a strip_tags call. That removes all HTML markup formatting. Basically it shouldn't scrubb out any text information. Can you give me an example of what your people paste?
I think that Word has a feature to copy code as plaintext...but I bet that's too hard for your users to figure out. :-/
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Yeah my users tend to be a lazy lot Actually a lot of them coming into the serendipity blog arent that web savvy as is not a technical blog as such.
Perhaps what I can do is modify one of the files and have a little note there to paste as text and with some instructions. Maybe even open a little popup window with help instructions for comment pasting etc..
thanks
Perhaps what I can do is modify one of the files and have a little note there to paste as text and with some instructions. Maybe even open a little popup window with help instructions for comment pasting etc..
thanks
Eddie Traversa
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
Pasting WORD text in new post
I don't have this problem with comments, but I do have it with posts.
I write what I have to say in WORD, insert hyperlinks, indent the quotes, then I copy it all and paste it into a new poste (using IE, since pasting does not in Firefox). Often it works out fine, but sometimes the layout does not look correctly: Some paragraphes or words are bigger than others, although I used the same font and the same font size (verdana 10pt) in WORD.
Sometimes the post looks fine in Firefox, but not in IE. This usually happens, when I edit a post online (i.e. no copy and paste again).
Some posts look fine in Ansicht->Schriftgrad->"Mittel", but not in "Groesser".
=> Do I have to stop using WORD to layout my texts and then copy and paste into the blog?
Why have I done it so far? Because typing is faster in WORD. And I take my notes in WORD. And in WORD I can define the space between two paragraps as 0,4pt, while in s9y editor it has to be a full line.
I am running Serendipity v.0.7.1 and I am concerned that I do not manage to update. Well, should I try to update?
This is my blog: http://atlanticreview.org
Thanks
Joerg
I write what I have to say in WORD, insert hyperlinks, indent the quotes, then I copy it all and paste it into a new poste (using IE, since pasting does not in Firefox). Often it works out fine, but sometimes the layout does not look correctly: Some paragraphes or words are bigger than others, although I used the same font and the same font size (verdana 10pt) in WORD.
Sometimes the post looks fine in Firefox, but not in IE. This usually happens, when I edit a post online (i.e. no copy and paste again).
Some posts look fine in Ansicht->Schriftgrad->"Mittel", but not in "Groesser".
=> Do I have to stop using WORD to layout my texts and then copy and paste into the blog?
Why have I done it so far? Because typing is faster in WORD. And I take my notes in WORD. And in WORD I can define the space between two paragraps as 0,4pt, while in s9y editor it has to be a full line.
I am running Serendipity v.0.7.1 and I am concerned that I do not manage to update. Well, should I try to update?
This is my blog: http://atlanticreview.org
Thanks
Joerg
yes its a problem for posts too, as I like to write in word and then cut and paste myself. So perhaps this could be a feature request to strip out all word comments.
Eddie Traversa
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
DHTML
http://dhtmlnirvana.com/
Spiritual Blog
http://www.truthrealization.com/index.php
Ditto. Drupal has a mod that removes special Word formatting... I was wondering if someone could write something like that for Serendipity?
The problem for me is not the post looking funky - it's that the feed won't validate. Word uses its own code somehow for the following marks:
I haven't really tried the Drupal mod out too much, so I don't know how it works or even if it's as effective as it should be. But if they can do it, I think S9 should be able to.
The problem for me is not the post looking funky - it's that the feed won't validate. Word uses its own code somehow for the following marks:
I have several people who post articles by sending them to me as Word attachments. I've tried several shortcuts, but in the end, I just have to copy and paste from Word into the S9 entry box, then hand-replace every one of those marks with the same mark (but typed in via the S9 interface, they work fine), and then post. Otherwise, it wrecks the feed.hyphen -
quote "
apostrophe '
I haven't really tried the Drupal mod out too much, so I don't know how it works or even if it's as effective as it should be. But if they can do it, I think S9 should be able to.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Yes, a plugin using the frontend_display hook to modify contents of $eventData['comment'] would be fairly easy.
Someones want to try it? He/She can use the nl2br or s9ymarkup plugin as a foundation class and make str_replace() calls to replace the ugly characters...
Regards,
Garvin
Someones want to try it? He/She can use the nl2br or s9ymarkup plugin as a foundation class and make str_replace() calls to replace the ugly characters...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I wish, but I'm nowhere near being able to write a plug-in. People talk like it's so simple (at other forums, too - Drupal, WP, etc.), but when I read tutorials on it, I get really lost really quickly.
But you know, if someone wants to write one for it and I can help by testing it or something, I'd be glad to help anyway I can.
But you know, if someone wants to write one for it and I can help by testing it or something, I'd be glad to help anyway I can.
-
- Regular
- Posts: 14
- Joined: Mon Jul 25, 2005 12:11 am
Cool! The ones I'm aware of are just the symbols for quote marks, apostrophes and hyphens bookended by spaces. Word makes the quotes and apostrophes curly (typing them directly into S9 makes them straight) and it makes the hyphens like - these - a little bit longer than they appear here. Is that what you need? Or do you need me to go into Word code and find something? Please just let me know.
I think other posters here have raised other issues I'm not aware of - hopefully, they'll come in and explain.
I think other posters here have raised other issues I'm not aware of - hopefully, they'll come in and explain.
i need a list of all word tags since i dont have ms word, something like:Hathor wrote:Cool! The ones I'm aware of are just the symbols for quote marks, apostrophes and hyphens bookended by spaces. Word makes the quotes and apostrophes curly (typing them directly into S9 makes them straight) and it makes the hyphens like - these - a little bit longer than they appear here. Is that what you need? Or do you need me to go into Word code and find something? Please just let me know.
I think other posters here have raised other issues I'm not aware of - hopefully, they'll come in and explain.
<p:o>, <hyphen> ...
Quotes, and apostrophes are no prorblemAnonymous wrote:i need a list of all word tags since i dont have ms word, something like:Hathor wrote:Cool! The ones I'm aware of are just the symbols for quote marks, apostrophes and hyphens bookended by spaces. Word makes the quotes and apostrophes curly (typing them directly into S9 makes them straight) and it makes the hyphens like - these - a little bit longer than they appear here. Is that what you need? Or do you need me to go into Word code and find something? Please just let me know.
I think other posters here have raised other issues I'm not aware of - hopefully, they'll come in and explain.
<p:o>, <word:xyz> ...
I'm not sure I know what you mean, but... okay, if I type this in word:
"Blah's - blah - blah blah"
And then copy and paste that into the Serendipity entry box, the quotes and apostrophe will appear as sort of slanted instead of straight, and the hyphens will be longer than normal dashes. Then, if I go into the entry box and simply type OVER each symbol with the very same symbol, it replaces them with the simple version, and that works just fine.
If I leave the slanty Word stuff in, it invalidates the feed.
I'm afraid I'm not being very helpful, but I'll keep trying.
"Blah's - blah - blah blah"
And then copy and paste that into the Serendipity entry box, the quotes and apostrophe will appear as sort of slanted instead of straight, and the hyphens will be longer than normal dashes. Then, if I go into the entry box and simply type OVER each symbol with the very same symbol, it replaces them with the simple version, and that works just fine.
If I leave the slanty Word stuff in, it invalidates the feed.
I'm afraid I'm not being very helpful, but I'll keep trying.
well i know what you mean but thats not what i am asking forHathor wrote:I'm not sure I know what you mean, but... okay, if I type this in word:
"Blah's - blah - blah blah"
And then copy and paste that into the Serendipity entry box, the quotes and apostrophe will appear as sort of slanted instead of straight, and the hyphens will be longer than normal dashes. Then, if I go into the entry box and simply type OVER each symbol with the very same symbol, it replaces them with the simple version, and that works just fine.
If I leave the slanty Word stuff in, it invalidates the feed.
I'm afraid I'm not being very helpful, but I'll keep trying.
i am asking for the tags psych3 told about, when i know them - the plugin will be done soonpsych3 wrote: A few of my readers have had this problem. When pasting from MS word into the comments section, it puts into office specific tags which in turn cause the comments texts layout to go haywire.
-
- Regular
- Posts: 14
- Joined: Mon Jul 25, 2005 12:11 am