开发者

What's wrong with editing in TinyMCE?

开发者 https://www.devze.com 2023-03-01 08:31 出处:网络
I\'ve noticed now after implementing TinyMCE on my site that when I\'m editing it doesn\'t read HTML the way a normal editor does it, like Dreamweaver.

I've noticed now after implementing TinyMCE on my site that when I'm editing it doesn't read HTML the way a normal editor does it, like Dreamweaver.

It's a little tough to de开发者_如何学Goscribe exactly what's wrong but let's say I've got two tables on each side of a frame. Even though I've created them exactly the same, the attributes are different until I edit "table properties" and remove the extra code that the editor puts in "style".

This is just an example of many. I'm starting to think I'm just stupid, but I was hoping someone could explain to me why this is?

When I look into the database the code looks absolutely horrible :) Is that much code really necessary just to write simple HTML?


Short of hand-composing/editing your markup, you're not going to get perfectly simple and straight forward markup with any editor. Some are more atrocious than others (Word, I'm looking at you), but some editors do allow you to output XHTML-compliant markup, which I think is better than the markup soup you get otherwise.

You can checkout WYMeditor:

http://www.wymeditor.org/

And, depending on your needs, MarkItUp could also be useful:

http://markitup.jaysalvat.com/home/

Also, Markdown:

http://daringfireball.net/projects/markdown/

EDIT

As your comment suggests, you may not be interested in switching from TinyMCE (although I think you should look at WYMeditor).

Take a look at the configuration options:

http://tinymce.moxiecode.com/wiki.php/Configuration

Specifically:

http://tinymce.moxiecode.com/wiki.php/Configuration:inline_styles

http://tinymce.moxiecode.com/wiki.php/Configuration:valid_elements

http://tinymce.moxiecode.com/wiki.php/Configuration:invalid_elements

http://tinymce.moxiecode.com/wiki.php/Configuration:extended_valid_elements

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号