|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 64 Location: Heraklion Crete
|
TinyMce is the greatest feature of v3 I think. But, the way Niels configured it, lacks of style manipulation and a bug when you want to style tables. Let me explain. By creating H1, H2 and other tags in umbraco css, we can have them inserted magically in the editor. By creating .style1 .style2, we can have spans with styling. How can we get an H1 tag, with the last 2 words in a red span? How can we easily change the H1 tag to H2 etc? How...(!) We cant. If you have a look at the original tinyMce (full example - http://tinymce.moxiecode.com/example_full.php), you will notice the -Format- dropdown. With this dropdown you can maniputalte P, H1 and other tags. I've managed to make the needed changes in order to have both styles and -Format- dropdown in the tinyMce. Yes, it is working, and is very flexible when you are styling. Change your p tags to H1, address, pre, and the opposite. Style freely with the -styles- dropdown everywhere, or remove them easily. You dont have to make H1 tags in umbraco css, because -Format- dropdown have all the needed. Of course you can style them in your main css. Only create .span classes for inline styling. Another great implementation I've managed to do, is... html templates in tinyMce. What if you want to give your editors some style-ready tables in order to fill them? Some style-ready divs? Or any html snippets. You can create your html snippets inside umbraco, name them and ready to use! It is easy to make all the above to work. Download at http://www.joyhost.gr/media/6291-leftinymce.zipInstructions included. Lefteris
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 413 Location: vipperoed, denmark
|
I love the html snippets .. it's very very cool. I've been missing that for a long time. Having that gives you even more control over what the users can and can't do. With that I can disable the create table support and give them some predefined - preventing the user to f*ckup the design. Cool implementation. I haven't tried the rest yet :o) Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
Lefteris wrote: How can we get an H1 tag, with the last 2 words in a red span? How can we easily change the H1 tag to H2 etc? How...(!) We cant.
By total purpose. We won't. Period. Editors needs to focus on the text. The web isn't a playground and editors aren't designers - they're copywriters. That's why the emoticons are missing too. The snippet idea is excellent. Let's integrate that to 3.1. Cheers, Niels...
Jeeeez, did I really start this :-)
|
|
Rank: Devotee
Joined: 1/28/2007 Posts: 142
|
@Lefteris - this is really cool... I agree with Jesper, this can really help preventing writers/editors to f%%% the design. One question though, regarding the dll. does it contain the fixes made past the 3.0.1 release?
| Roni Biran | advansoft ltd | umbracist for a year give or take.... | waiting for CG08, missed the last one :no: |
|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 64 Location: Heraklion Crete
|
The editorControls is from 3.0.1 and it contains the following: - config.Add("template_external_list_url", "/scripts/mcetemplates.js"); because I cannot define it elsewhere (e.g. tinymceconfig.config It is the js where we define the htm snippets - also re-enables the visualaid button in tinyMce (you must then define in tinymceoncifg.config) - a small hack in order to make -Format- dropdown to work and table css assignment Code:if (p.Alias.StartsWith(".")) styles += p.Text + "=" + p.Alias.Substring(1); The editor_template.js which you put it in umbraco_client has minor fixes for the workaround.
|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 64 Location: Heraklion Crete
|
Niels Hartvig wrote:Lefteris wrote: How can we get an H1 tag, with the last 2 words in a red span? How can we easily change the H1 tag to H2 etc? How...(!) We cant.
By total purpose. We won't. Period. Editors needs to focus on the text. The web isn't a playground and editors aren't designers - they're copywriters. That's why the emoticons are missing too. The snippet idea is excellent. Let's integrate that to 3.1. Cheers, Niels... Niels, I agree with the emoticons, our clients wont need that and other funcy things . But the editors are our clients. Our clients are responsible for the text, new pages, and other stuff we programed to do. A client should not call us everytime he cannot change the h1 tag.
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
@Lefteris: Just to clarify; Your client doesn't need to call you to change a h1 element to another semantic element. The current tinyMCE fully supports that.
But if your client wants the past words of a headline in a new color and you think that's a good idea and in line with design guidelines (or maybe there's none) luckily the you've proven that the flexibility of umbraco even support madness like that ;-)
But to give that kind of control, that kind of loosing focus by default is a terrible idea IMHO. That was the reasoning behind gathering all typographic markup in one select box with the focus on "headline", "teaser" or "paragraph" rather than sizes and colors. No solution even covers everyone, and there might be a couple of clients hating that they'll only be able to be writers not artists. At least this implementation gives you a chance to tell them why. Start a dialog on how text ought to be formatted on the web.
And I'm still convinced that it should be the default. They can always dump umbraco in favor of MS Frontpage then ;-)
Cheers, Niels...
Jeeeez, did I really start this :-)
|
|
 Rank: Fanatic
Joined: 7/22/2006 Posts: 253 Location: Randers, Denmark
|
I wanted to give you an example of how bad things can go, when the editor is given too much freedom to design on their own, but sadly waybackmachine.org doesn't store stylesheets 'n subpages. The old webpage of my hometown looked like crap because the content editor in every department had their own idea about how things should be styled. Obviously they didn't have any design guidelines. Different bodytext fonts on each page and occasionally a nasty color change. Oh yeah, I still wake up screaming :ohmy: But it seems that they've had some advice with the new one. Looks a whole lot better.
Best Regards Simon Simm.dk - My base on the web - proud Umbracian since 2.0 Beta
|
|
Rank: Devotee
Joined: 7/22/2006 Posts: 64 Location: Heraklion Crete
|
I agree with all the above. I dont want to give writers functions like changing fonts, colors everywhere, other than the standard design I made, or crappy stuff.
But some basic handling (following my guidelines I always give) with the classes I have created and simple manipulation of the H and P tags (again following my guidelines).
If my design is too complicated, maybe I need more handling from the tinyMce. If I need an H2 that must be in orange color and not the default in my css, or a pre tag that must have other background color than the predefined in the css, I cannot have it.
Thats why I created my workaround, for flexibility in compicated designs.
In -style- dropdown I have the .classes (colors, floatings, etc) and in -Format- dropdown I have the basic -search engine helpers- h, p , pre and other tags.
Table plugin in standard umbraco tinyMce, cannot recognize the classes. In my workaround there is no need to change the Table plugin source (or all the others) in order to play with the umbraco css.
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 205 Location: New York, NY, USA
|
Hi, I spent a few hours today looking through the tinymce files in my umbraco installation, but am really at a loss. I have a feeling that Lefteris or another of you smart people could help me out... I was interested in enabling the "Paste from Word" plugin, and I noticed that Niels included all the plugins in umbraco, but I can't seem to locate the "tinyMCE.init" command which is required for implementation (as mentioned here:< http://wiki.moxiecode.com/index.php/TinyMCE:Configuration>). I'd like to add the following to the .init: apply_source_formatting : true theme : "advanced" plugins : "paste" (and any other requirements from http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste) According to the documentation, there should be a spot for this in an HTML document... Code:
<html>
<head>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas"
});
</script>
</head>
Any ideas where I should be putting this stuff? Thanks so much! Heather
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
If I remember correctly, it's actually paste from word that's loaded as the default paste.
/n
Jeeeez, did I really start this :-)
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 205 Location: New York, NY, USA
|
Thanks, Niels, But I was having trouble making it work correctly in my umbraco installation... I tested their example here: http://tinymce.moxiecode.com/example_word.php?example=true and it worked well. I noticed that they have a special button for Word Paste:  which I didn't see as an option in the umbraco installation... Also, I seem to have read somewhere on the TinyMCE site that you needed to enable "theme : "advanced"" to use Word Paste. Also I'd like to include the "apply_source_formatting : true" config option, since right now the HTML code in the RTE is all run together... Thanks! Heather
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
Could you add both issues to the issue tracker at codeplex? Don't worry too much about the icons as they're not the same in umbraco and tinymce (for backwards look/feel).
But I'll make sure to follow up once I get back from vacation in 8 days (taking a week break from monday - yeah!)
Jeeeez, did I really start this :-)
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 205 Location: New York, NY, USA
|
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,410 Location: KY, USA
|
Oh, man, this is huge! Users copy and paste from other websites, word docs, etc. all the time. Every page looks different because the styling information comes along for the ride. I even had a table inserted with one cell and a fixed width... which naturally was wider than the site's design allowed for. Ugly. Is there anything that can be to make v3.0.x do clean pasting, even before you get this sorted out in v3.1? Thanks, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
I've just tried to copy some ugly word text and when using CTRL+V I was prompted for cleaning the html. However, when using the "Paste" button I wasn't. That's a bug, which definately should be fixed for 3.0.3!
/n
Jeeeez, did I really start this :-)
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,410 Location: KY, USA
|
I'm using v3.0.1 (with IE7 on XP) and it didn't prompt me with either CTRL-V or the Paste button. Should it have? thanks, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
Rank: Devotee
Joined: 6/25/2007 Posts: 99 Location: Malmo, Sweden
|
Douglas Robar wrote: I'm using v3.0.1 (with IE7 on XP) and it didn't prompt me with either CTRL-V or the Paste button. Should it have?
thanks, doug.
Same experience as Douglas. No prompt with either CTRL-V or the Paste button. Tried both 3.0.1 and 3.0.2 in IE 7 on Vista.
Is it me or umbraco? Level 2 certified, but a bit rusty after 8 months on umbracoless projects
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 818 Location: Nyborg, Denmark
|
Remember that it only prompts if the html is dirty (ie, illegal html) and it isn't 100% bullet-proof.
Should there be an option to always prompt when pasting html or maybe a configuration of stop words (for element-names and class names) that should open the cleaner dialog?
/n
Jeeeez, did I really start this :-)
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,410 Location: KY, USA
|
Yeah, something like that. I'm open to ideas and suggestions about how best to handle it. My specific problem is that users want to copy/paste from Word and other websites. What gets pasted is, strictly speaking, valid html. It is just bloated, ugly, has unnecessary markup with spans everywhere, and a lot of built-in styling right in the tags. Cleaning this up to "pure" html is a bother, and beyond most users. Whatever solution is chosen, it should be a configurable option. Maybe four levels of "clean-ness". 1. Valid XHTML 2. No in-line formatting, remove extraneous divs and spans 3. Keep specified markup, delete the rest (for instance, keep P H1-H6 BR UL/LI B STRONG I EM, possibly HR, maybe TABLEs) 4. Paste as plain text, no markup at all, put a blank line wherever a P might go Who else has ideas about this? cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
|
Guest |