0

I'm trying to switch from Drupal to WordPress, and I have lots of articles written in Drupal's WYSIWYG Editors, and stored like

<p>Hi, this is an article</p><p><img bla='bla'></img></p>

So I want to directly copy the source code and paste it into WordPress. I can do it by disabling the visual text editor. So it works for migrating existing articles in.

But what about writing new articles?

I couldn't find any wysiwyg editors that automatically insert <p> tags. I tried the Ultimate TinyMCE plugin, but it only adds some buttons, does not change the situation.

To summarize my problem:

When I write

Article line 1
Article line 2

in the "Visual" Tab, I want to see

<p>Article line 1</p><p>Article line 2</p>

in the "Text" Tab.

But instead, I see exactly what I wrote, and this causes bad HTML output, when getting $post->post_content;

Thanks !

2 Answers 2

0

Why not automate the move from Drupal to WP? I think WP will fix some of the P tag issue during the upload. http://codex.wordpress.org/Importing_Content#Drupal

If that isn't an option, I think WP is using br's instead of full new p. From the visual editor, I'd delete the copied break altogether and "enter" a new one.

1
  • As I see, wordpress does not even use <br>'s. It directly saves the article as plain text. like in notepad. Automating is not necessary, since I have 5-6 articles, I can copy paste them. But first I have to make sure that I can continue writing "migratable" content.
    – jeff
    Jul 12, 2013 at 19:46
0

It seems the solution for this is the plugin called TinyMCE Advanced.

Just install it, and go to Settings -> TinyMCE Advanced -> Check the box where it says Stop removing the <p> and <br /> tags when saving and show them in the HTML editor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.