Clean Word HTML Problems

Clean Word HTML Problems

por d g -
Número de respuestas: 15
Hello!

Can anyone help me! My issue is:

Un-needed HTML Code is carried over whenever you CUT and Paste from MS Word. The Clean Word HTML Button doesn't seem to work.?

Does anyone know why and how to fix?

Thanks alot!
Berlosblack eye
Promedio de valuaciones (ratings): -
En respuesta a d g

Re: Clean Word HTML Problems

por Mary Cooch -
Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Testers Imagen de Translators
Have you tried putting the text into notepad first and then pasting into Moodle?
En respuesta a Mary Cooch

Re: Clean Word HTML Problems

por d g -
Hi, Mary

Yes, I went into Notepad and alot of the HTML coding issues seem to disappear but there is maybe one or two left.

Is there a way to clean up all the text?

Thanks so you helpwide eyes
En respuesta a d g

Re: Clean Word HTML Problems

por Thomas Bachert -
Berlos,

You can either do as Mary suggested, or you can try highlighting the text (Ctrl+A) after pasting it into the HTML editor and then click Clean Word HTML.

Either of these two options should work.

Tom
En respuesta a Thomas Bachert

Re: Clean Word HTML Problems

por d g -
Tom

I guess I will follow the suggestions put forth by Mary and yourself. I was seeking away to clean up any and all issues but I guess there will always be some stray code.

Thanks
Berlos
En respuesta a d g

Re: Clean Word HTML Problems

por Thomas Bachert -
Berlos,

Take a look at this forum posting, http://moodle.org/mod/forum/discuss.php?d=107186#p622041, there are some other alternative ideas.

Good Luck,
Tom


En respuesta a d g

Re: Clean Word HTML Problems

por Henry Happ -
I can verify that this doesn't work in Moodle 1.9.5 or 1.9.7, at least when pasting from Word 2007. I was going to paste in a simple sentence copied from Word, but even after clicking the Clean Word HTML button, the post showed all of the Word html coding. sad

Is there any way to 'easily' incorporate and use a different HTML editor, such as TinyMCE that has a 'Paste from Word' function that works to strip out the Word html coding?

Having our professors copy everything to Notepad first isn't really an option as they would lose all of the formatting that they are putting into their lessons as they write them in Word.
En respuesta a Henry Happ

Re: Clean Word HTML Problems

por Mary Cooch -
Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Testers Imagen de Translators
Sorry to ask what probably seems like an insensitive question but- you say "as they write them in Word" - why don't you just get them to write them straight into Moodle?
En respuesta a Mary Cooch

Re: Clean Word HTML Problems

por Henry Happ -
@Mary: If it were only so simple! The course writing process for our organization, which I have no control over, is a multi-step process requiring the use of specific template, reviews, etc. so creating a course directly in Moodle isn't really an option.


En respuesta a Henry Happ

Re: Clean Word HTML Problems

por David Barrett -
A free option, although one that will require a little download time, is to use OpenOffice (http://www.openoffice.org/), a free office suite that includes word processing, spreadsheet and other modules similar to those offered by Microsoft.

OpenOffice can be used in two ways to overcome your problem. The first, and most straightforward, is to copy the content of your Word document and paste it into OpenOffice. It will retain all of the formatting, and when you then copy and paste the text from OpenOffice into Moodle the Word rubbish is gone.

The other way, for new documents, is to actually create the text in OpenOffice and copy and paste it straight into Moodle. You can then save the OpenOffice document into Word (.doc) format using "Save as ...", so that you still end up with your Word document if need be - and it sounds like that's important in your institutional setting.

This may seem a bit unwieldy in the short term, but in the long run, if Clean Word HTML is not working, it does offer a reasonable and cheap solution to a painful problem.

For the record, this also works using Apple's Pages, for those of you who use Macs.
Promedio de valuaciones (ratings):Useful (1)
En respuesta a David Barrett

Re: Clean Word HTML Problems

por Henry Happ -
@Dave: This may be a viable alternative! If I can convince our course writers to do so. However, having a simple "Paste from Word" button would eliminate another step/tool to use. Thanks for the suggestion.
En respuesta a Henry Happ

Re: Clean Word HTML Problems

por Itamar Tzadok -
Perhaps a VBA script or macro that copies the text of the document onto the clipboard as plain text and implemented as a button in your Word templates can be a reasonable and transparent enough workaround. That would be a simple "Copy to clipboard" button and then just a simple paste into the Moodle editor. sonrisa
En respuesta a d g

Re: Clean Word HTML Problems

por Nadav Kavalerchik -
Imagen de Core developers Imagen de Plugin developers Imagen de Testers Imagen de Translators
I have made a new tool / icon (plugin) for the HTMLArea editor's toolbar that uses the html_purify() function from Moodle's libs.

It can help you remove chunks of unvisible MS(tm) WORD styles and code like this one:

========================= code chunk starts here
<!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Miriam; panose-1:2 11 5 2 5 1 1 1 1 1; mso-font-charset:177; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:2049 0 0 0 32 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:right; mso-pagination:widow-orphan; direction:rtl; unicode-bidi:embed; font-size:10.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:Miriam; mso-fareast-language:ES;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0; mso-gutter-direction:rtl;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:653023010; mso-list-type:hybrid; mso-list-template-ids:156421878 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:54.0pt; mso-level-number-position:left; margin-left:54.0pt; text-indent:-18.0pt; font-family:Symbol;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
========================= code chunk ends here

but you need access (and some php knowledge) to your server's code.
for you to patch the current Moodle install, you are using.

i will add a link from the MDL (soon)
sonrisa