Pages: [1] |
|
|
Author |
Topic: Disable text formatting? (Read 228 times) |
namikani
Beta Tester
Posts: 4
|
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
|
|
|
|
admin
Forum Administrator

Posts: 1771
SnippetMaster Author
|
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.)
|
|
|
|
namikani
Beta Tester
Posts: 4
|
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.
|
|
|
|
admin
Forum Administrator

Posts: 1771
SnippetMaster Author
|
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?)
|
|
|
|
namikani
Beta Tester
Posts: 4
|
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...
|
|
|
|
namikani
Beta Tester
Posts: 4
|
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
Thanks for the help Henri
|
|
|
|
Opossumi
Posts: 5
|
Can I ask...... How can you disable <span> elements?
Mari
|
|
|
|
|
Pages: [1]
|
|
|
|