Almost all of my work with Drupal over the next year will involve bringing static HTML websites into Drupal's CMS.

That means a lot of copy and pasting from .html files into nodes, and then cleaning up the code. The vast majority of my work is with my editor in Full HTML mode.

For whatever reason, when I installed Drupal (7) I also installed ckEditor. I don't really have many complaints, and I realize the vast difference between creating nodes in a database vs. just hacking out individual .html files, but really, compared to using a stand alone program like Notepad++, doing this work with Drupal isn't all that much fun or efficient.

Have I made a mistake in choosing ckEditor? Is there a more friendly Full HTML editor out there (possibly even Drupal's default editor)?

Thanks for any opinions.

Comments

VM’s picture

drupal doesn't have default editor at this point. All editors work essentially the same way. Personally, I wouldn't copy and paste the HTML. I'd copy and paste the text, then use the editor itself to restyle similarly to the original.

Anonymous’s picture

I hadn't really thought of doing it this way. Since I am using a slightly different format (static vs Drupal), doing it your way makes some sense. Sometimes during html code clean up my tags get all haywire. Adding them individually would help to avoid that kind of mess. Thanks.

pschuette’s picture

I found using Notepad with no word wrap works better than editing in the Drupal control panel. This way I can make frequent saves and no lose what I have edited. Be sure to close any unneeded gaps or the text that follows shows up in preview.

Jaypan’s picture

Here is what you can do

1) Enable the PHP module that ships with core. This will give you the option of using PHP in your nodes. You will have to google for some information on how to set it up.
2) User notepad++ (or any other editor) to create a file in the web root of your Drupal installation named 'editing.php'.
3) In the node for the page you want to work on, add the following code:

include_once('editing.php');

3) You can now edit editing.php, and the changes will show in the node body. You can refresh the page to see your changes.
4) When you are satisfied with the page, copy everything from editing.html and...
5) Edit the node again, remove the PHP code above, paste in the code from the editing.php file, and save the node.
6) Delete editing.php

This will allow you to work within notepad++, while using the Drupal node system. Also note however that there could be security risks, which is why I added step 6.

Anonymous’s picture

I never expected a response like this. I would so love to be using Notepad++ again. No doubt it will take some time for me to figure all of this out but in my case this seems a great solution.

Since I'm new to Drupal and php, I'm never entirely sure what the security risks you mentioned are. But I could just develop the site on my localhost using this technique and, once finished, just paste the final code into nodes on the my server version of the website.

Really, thanks again. For my purposes (working with existing html), moving to a CMS and having to use an editor like ckEditor seemed like such a giant step backward (not to criticize the product). This solution really changes my whole perspective.

Anonymous’s picture

I want to thank you again jaypan. This took all of 5 minutes to figure out and get going.

I am glad I had the experience of using (only) the ckEditor because now I know what it considers proper form for HTML markup.

And I seem to have an issue where the code for inserting blocks into content via the use the Adsense module doesn't render on the page properly when this php method is used. (And who knows, maybe I'll get that problem figured out.)

But that's such a minor issue in comparison to being able to use a real text editor where after "saving" my work so I can view it, I don't have to reopen my node to the full-window editor mode and then scroll all the way back down to the point where I am working on the code.

This is really going to make my life easier and more enjoyable. Thanks again.