Prenos vsebine na spletno stran je velikokrat problematičen pri izdelavi spletne strani. Ogromen problem se pojavi pri kopiranju (copy-paste) iz MS Worda, saj se prenese ogromno meta-kode.
FCKeditor ima možnost kopiranja iz Worda preko poosebne ikone. A kaj, ko je večina neveščih uporabnikov ne uporablja in kopirajo neposredno brez uporabe Paste from Word funkcije.
Obstaja rešitev, s katero lahko privzeto zaklenete Paste as plain tekst, uporabniku pa še vedno pustite opcijo, da naredi Paste iz Worda
First of all you need to enable "Force Paste Plaintext" so that your FCKEditor always by default pastes plain text. Do this by going into the Control Panel >> Editor and add this:
FCKConfig.ForcePasteAsPlainText = true;
Then you're going to have to edit the following files:
/var/www/dekiwiki/editor/fckeditor/core/editor/js/fckeditorcode_gecko.jsGo to line 108 and look for the following:
|| FCKConfig.ForcePasteAsPlainTextAnd remove it
And:
/var/www/dekiwiki/editor/fckeditor/core/editor/js/fckeditorcode_ieGo to line 76 and look for the following:
||FCKConfig.ForcePasteAsPlainTextAnd remove it
Now empty your webbrowser cache as test it out. By default FCKEditor will now clean out all text pasted and only allow plain text to be pasted, except for when users choose to click the "Paste from Word" button which they can use for pasting tables and so on!
Več podrobnosti Improve pasting from Microsoft Word
Kaj pa ti misliš?
Ni komentarjev:
Objavite komentar