TinyMCE and HTML View Options
mrutledge
Posted: Thursday, November 29, 2007 8:58:15 PM
Rank: Enthusiast

Joined: 11/14/2007
Posts: 15
Is there a tweak for the TinyMCE HTML view that will make it keep the formatting that it was entered in? It is really annoying to edit the HTML in HTML View because it removes all the whitespace and formatting.
janaagaard
Posted: Wednesday, December 19, 2007 11:04:11 AM
Rank: Newbie

Joined: 12/19/2007
Posts: 6
Matt Rutledge wrote:

Is there a tweak for the TinyMCE HTML view that will make it keep the formatting that it was entered in? It is really annoying to edit the HTML in HTML View because it removes all the whitespace and formatting.

I don't think that you can stop TinyMCE from messing with your html source, but Tiny has the apply_source_formatting setting that makes it produce nice html code. I don't know how you apply this setting, however, but I'm not really sure about the possibilities with tinyMceConfig.config file.

http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/apply_source_formatting
janaagaard
Posted: Wednesday, December 19, 2007 11:19:14 AM
Rank: Newbie

Joined: 12/19/2007
Posts: 6
Sorry about replying to myself, but it seems that Tiny has the option you're looking for: preformatted, which should preserve tabs and spaces.

http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/preformatted
mrutledge
Posted: Wednesday, December 19, 2007 4:46:56 PM
Rank: Enthusiast

Joined: 11/14/2007
Posts: 15
Thanks those options are exactly what I am looking for. Now I just need to find out where to apply them. Does anyone know where tinyMCE.init() gets called in Umbraco? I cant seem to find the call.
kutedawako
Posted: Wednesday, December 19, 2007 8:25:02 PM
Rank: Devotee

Joined: 9/12/2007
Posts: 58
Location: Honoluu, HI
Try this one:

\\[YouUmbracoInstallation]\umbraco_client\tinymce\tiny_mce.js

Post your fix once you get it working ;)
mrutledge
Posted: Wednesday, December 19, 2007 9:22:11 PM
Rank: Enthusiast

Joined: 11/14/2007
Posts: 15
Yoo Hoo! :w00t: I got it thanks to all of your help. It doesnt keep the tabs as nice as I would like but it is way better than having everything slammed into one big mess. What you have to do is this:

1. Open the tiny_mce.js file, in some text editor, located under \\[UMBRACO INSTALLATION]\umbraco_client\tinymce\
2. Then search for the following: this._def("apply_source_formatting"
3. Change the value from false to true and save. Now all formatting takes place in the HTML view.

You can follow the same logic for other configurations or you can add configurations that are missing by adding a new this._def(config, value); item.

Thanks for everyones help!!!! :w00t:
Ig_p118
Posted: Wednesday, January 09, 2008 10:34:04 AM

Rank: Fanatic

Joined: 7/21/2006
Posts: 315
Location: Salerno - Italy
Matt Rutledge wrote:

Yoo Hoo! :w00t: I got it thanks to all of your help. It doesnt keep the tabs as nice as I would like but it is way better than having everything slammed into one big mess. What you have to do is this:

1. Open the tiny_mce.js file, in some text editor, located under \\[UMBRACO INSTALLATION]\umbraco_client\tinymce\
2. Then search for the following: this._def("apply_source_formatting"
3. Change the value from false to true and save. Now all formatting takes place in the HTML view.

You can follow the same logic for other configurations or you can add configurations that are missing by adding a new this._def(config, value); item.

Thanks for everyones help!!!! :w00t:


Could you publish a fix...?

Red Consulting s.a.s - Umbraco from v1.0
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.