Blog




Have you ever tried to edit a WordPress page offline in an editor of your choice with HTML syntaxhighlighting or even tag completition?
And have you too recognized that pasting the edited text from the editor to your WordPress textarea did result in strange looking pages / blog entries?

Even if you are using the “Text”-view of WordPress, it tries to support you while typing your blog in inserting e.g. line breaks (<br>). This also happens when you are pasting html code from your external editor to WordPress which results to code like the following:

Pasting the following block for example

After editing the html code you would like to paste to WordPress just replace all CR LF (\n\r) in the external editor with the empty string (with nothing). This results to one single line containing your complete blog post. And paste this to the WordPress editor being in the Text-view. Then switch to the Visual-view and back to the Text-view.

Voilà now your blog post is perfectly fine formated for WordPress.

But – caveat – when your blog post contains <pre>some preformated text</pre>tags these are messed up when switching back and forth from Text-view to Visual-view. You have to rewrite these manually.


Link

Link

Posts

  • No labels