SnippetMaster Support Forums
Return to main website
 
March 17, 2007, 07:30:51 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 17, 2007, 07:30:51 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Disable text formatting? « previous next »
Pages: [1] Print
Author Topic: Disable text formatting?  (Read 228 times)
namikani
Beta Tester

Posts: 4


[-] Disable text formatting?
« on: November 06, 2006, 11:36:56 AM »

Hi,

I'm having a problem stopping my clients from changing the text style. The site has a css file which is automatically applied. I've disabled all the bottons on the menu except for bold and italics. The only thing I can't stop them doing is pasting text formatted in Word directly into the window. Is there any way to disable that feature so that it is impossible for them to change the font size, type or colour?

Thanks
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 1771

SnippetMaster Author


WWW
[-] Re: Disable text formatting?
« Reply #1 on: November 06, 2006, 01:48:29 PM »

Sure, you can disable the "paste from word" icon from the toolbar.. but there is no way to stop them from using the paste (CTRL-V or right-click and choose paste) command directly.

(Well.. sortof.  It can be disabled in some versions of IE, but not in firefox or other browsers.)

Report to moderator   Logged
namikani
Beta Tester

Posts: 4


[-] Re: Disable text formatting?
« Reply #2 on: November 06, 2006, 03:41:48 PM »

No, and I think that's what they're doing, because the only bottons on their toolbar are "bold" and "italics". So there is absolutely no way that I can stop them from ruining the website? Could I perhaps use the program's code validation to somehow dismiss all the <span> tags that are added by Word?

Any ideas would be very welcome.
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 1771

SnippetMaster Author


WWW
[-] Re: Disable text formatting?
« Reply #3 on: November 06, 2006, 03:47:43 PM »

The best thing to do is maybe actually enable the "paste from word" icon in the toolbar.  At least this way, they can use this icon to paste their text.  It won't remove the formatting, but it'll really clean up a lot of the junk that Word tries to put in...

And you can also consider adding the "remove styles" icon.  This might be handy to use right after they do the paste, as it will remove ALL styles from the selected text.

So maybe something like this:

1) Customer hits "paste from word" icon, and does the paste.
2) Customer selects the html they pasted, and then hits the "clear all styles" icon.

That will leave text only... and then they can style it according to whatever stylesheet options you want to give them.

Hope that helps.  I'm open to ideas on stopping them from using the CTRL-V / paste ability in the browser, but this is something that is 100% controlled by each browser, and not all of them have the ability to turn it off. 

Hmm... not sure if you can remove all the "span" elements, because they are used for adding bold/italics and things like that, too.  (ie: It's valid xhtml markup, so the editor will not touch it unless you specifically remove it as a valid tag in the admin settings.  But in that case, you might wind up with inability to specify bold/italics and things like that.  Maybe try it out and see what happens?)

Report to moderator   Logged
namikani
Beta Tester

Posts: 4


[-] Re: Disable text formatting?
« Reply #4 on: November 06, 2006, 04:22:24 PM »

How do you create custom validation?
I looked in the documentation but I think the admin-general-settings.html hpage has somehow adopted the contents of the admin-editor-groups.html page...
Report to moderator   Logged
namikani
Beta Tester

Posts: 4


[-] Re: Disable text formatting?
« Reply #5 on: November 06, 2006, 04:35:13 PM »

Not to worry, I worked it out: I deleted the "class" attribute from "span". And it worked!!!
The junk is still there, but any formatting of text pasted through Word now gets ignored. And you can still apply formatting by using the editor's buttons Smile

Thanks for the help Henri

Report to moderator   Logged
Opossumi

Posts: 5


[-] Re: Disable text formatting?
« Reply #6 on: January 15, 2007, 06:18:36 AM »

Can I ask...... How can you disable <span> elements?

Mari
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: Disable text formatting? « previous next »
Jump to:  

Powered by MySQL Powered by PHP SnippetMaster Support Forums | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!