hallo, als idee, zwischenschritt zb über notepad...
Hallo,
ich habe TinyMCE eingebunden und stelle beim Testen ein Problem fest. Fügt man einen Text aus einem Word-Dokument in das Bearbeitungsfeld von TinyMCE ein, hat man hinterher im Quelltext jede Menge überflüssiger Wordformatierungen. Gibt es eine Möglichkeit den Text beim Einfügen von Formatierungen zu säubern? Hatte TinyMCE dafür womöglich sogar ein Plugin vorgesehen (ich habe nicht alle Button übernommen)? Ich weiß jetzt aber auch nicht sogenau wonach ich suchen muss. Kann mir da jemand weiterhelfen. Ich würde mich freuen.
tech 2003
hallo, als idee, zwischenschritt zb über notepad...
computer tun nur das was man ihnen sagt, meistens
kurzes googlen hat ergeben, daß es wohl plugins für den zweck gibt .. hab leider keine zeit, mir alles anzugucken, kannst ja mal nach tinymce word plugin googeln ..
Danke jayjay, das mit dem Notepad werde ich ausprobieren. Natürlich wäre es mir lieber, ich könnte nach einen Weg ohne diesen Umweg finden. Vielen Dank Wildmieze, ich hatte auch schon gegoogelt, aber scheinbar nicht mit den richtigen Stichworten. Werde mal sehen, ob ich unter word plugin das Gesuchte finde. Wünsche Euch einen schönen Abend und vielen Dank
Eine weitere Möglichkeit wäre die Festlegung von erlaubten Tags in der Konfiguration des TinyMCE Editors. Über das das Theme advanced lassen sich auch die einzelnen Buttons im Editor steuern - hierüber kann man die Möglichkeiten des Nutzers dann schon recht gut einschränken..
Eine Beispielkonfiguration:
Weitere Infos dazu:Code:tinyMCE.init({ mode : "exact", theme : "advanced", theme_advanced_buttons1 : "styleselect,separator,undo,redo,removeformat", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", valid_elements : "span[class],span!class,p[class],p!class,br"
http://wiki.moxiecode.com/index.php/...valid_elements
http://wiki.moxiecode.com/index.php/...ed_buttons_1_n
Ich hab gerade noch mal auf der Wiki Seite von moziecode nachgeschaut - da gibt es auch noch ein paste Plugin, welches unter Anderem Word Texte wieder bereinigen sollte. Ich kenne nur die alte Version aus dem 2-er TinyMCE, damit hatte es immer recht gut funktioniert..
Anbei der Link:
http://wiki.moxiecode.com/index.php/...:Plugins/paste
Das schlimme an kopiertem Wordkrams ist kein HTML, sondern sowas nettes:
Sprich, lauter Müllkrams in einem Kommentarblock.Code:<!-- /* 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;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} h3 {margin-right:0cm; mso-margin-top-alt:auto; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; mso-outline-level:3; font-size:13.5pt; font-family:"Times New Roman"; font-weight:bold;} p.MsoHeader, li.MsoHeader, div.MsoHeader {margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; tab-stops:center 8.0cm right 16.0cm; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} p {margin-right:0cm; mso-margin-top-alt:auto; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p.CurriculumVfk-Kurse, li.CurriculumVfk-Kurse, div.CurriculumVfk-Kurse {mso-style-name:"Curriculum Vfk-Kurse"; margin-top:0cm; margin-right:0cm; margin-bottom:6.0pt; margin-left:0cm; line-height:14.0pt; mso-pagination:widow-orphan; font-size:14.0pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p.curriculumvfk-kurse0, li.curriculumvfk-kurse0, div.curriculumvfk-kurse0 {mso-style-name:curriculumvfk-kurse; margin-right:0cm; mso-margin-top-alt:auto; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:132063528; mso-list-type:hybrid; mso-list-template-ids:2077938382 -1232598178 -1974726022 950536130 -624231620 -1322864296 311454794 -246545604 1304980262 -51074680;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-18.0pt; mso-ansi-font-size:10.0pt; font-family:Symbol;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
Um das weg zu bekommen, muss man via PHP & Co. über ein RegEx sowas rausfiltern und das dann speichern. Über TinyMCE allein geht es leider nicht.
“My software never has bugs. It just develops random features ...”
» DevShack - die Website des freien Webentwicklers Boris
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)