Customise TinyMCE HTML editor?

I’m using WebYep on a website, with the TinyMCE in-browser HTML editor.

I’ve created CSS styles for the client to use, but I just know they are going to deviate from these and play around with the different sizes, fonts and styles etc. that are available within the editor - and it will look a mess.

Is there a way to customise an in-browser HTML editor so that the client can only use my CSS styles and they can’t start to make text bold and pink?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi mark you can restrict them by removing some of the available tools within the html editor. You can create an optional setup file within the webyep-system/program/opt folder. The file needs to be named tinymce_init.php
then you need to add or remove what you feel the client will need or not as the case may be from within the theme_advanced_buttons lines.

all the best max

Below is an example which you can test removing items on:

  mode : "exact",
  theme : "advanced",
  convert_urls : false,
  relative_urls : false,
  plugins : "safari,style,table,advhr,advlink,iespell,insertdatetime,searchreplace,print,contextmenu,paste,noneditable,visualchars,nonbreaking,spellchecker",
  theme_advanced_buttons1_add_before : "newdocument,spellchecker,separator",
  theme_advanced_buttons1_add : "separator,forecolor,backcolor",
  theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
  theme_advanced_buttons3_add_before : "tablecontrols,separator",
  theme_advanced_buttons4 : "styleprops,separator,visualchars,nonbreaking",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_path_location : "bottom",
  valid_elements : "*[*]",
  invalid_elements : "",
  remove_linebreaks : false,
  apply_source_formatting : false,
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing : true,
  theme_advanced_resizing_use_cookie: true,
  nonbreaking_force_tab : true

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Max

Thanks for that. I was hoping that I could strip out nearly everything, especially the bold and underline etc. Not allowing the user to deviate from the CSS styles at all.

Do you know of any other CMS that I can do this in?

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It might be a bit annoying, but you ask Max, the founder of the webyep-action suite to seek another CMS for you? Hmm - he probably would but it is as he wrote:

You can strip down tinymce_init.php by removing the entries after the theme_advanced_buttons lines. So please give it a try - it might take a bit of time but finally you should be happy with it.

By the way: All other CMS using richtext-editors aswell, so it is not a question of CMS, it’s a question of what editor you use. So the focus is on the editor (and probably their helping desks) and not really a question of the CMS.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Thomas

You’re right. I meant to say text-editors, not CMS. Doh!

WebYep and Max’s action and help are invaluable and I didn’t mean any offence.

From Max’s post I can see that some, but not all of the text editor can be stripped out. And there isn’t much point in me stripping out some of the options, because clients will still play with the rest.

I’ve looked at the other text editors that Max recommends in his manual, but they all appear to offer more styling capabilities than I would wish for.

I guess it is more of an issue of educating clients to stick with the CSS styles.

Cheers

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Mark,

maybe tonight I got the chance to have a look at one of my editor settings, that is in fact reduced to a min and that can be more reduced - just as you need, for sure.

TinyMCE is for me the best on the market (unfortunately the most ugly one) - so I wouldn’t sidestep too much in this matter.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Thomas

Wow. That would be great.

You’re right it is ugly. It almost puts me off using it and recommending to clients…

Thanks

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What I often use is a WYSIWYM (What You See Is What You Mean) editor, rather than a pure WYSIWYG editor. I tend to use Markdown, and the Control.Textarea editor. That way the text saved in your database is as nearly code-free as possible, and your client also has as few ways to torque things as possible.

Here’s an extraction of my editing toolbox from a recent job:

http://scripty.walterdavisstudio.com/markdown

This doesn’t actually submit to the database and save, it’s just to show the editing toolbar and Showdown live converter in action.

Walter

On Oct 17, 2011, at 8:44 AM, Mark wrote:

Hi Thomas

You’re right. I meant to say text-editors, not CMS. Doh!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ok Mark,

here we go. This is what I use as tinymce_init.php :

It is a bit different to Max’s one, however I can’t ensure, if it works for you at all. The point is, that with even all major wy-upgrades I recognized some difficulties in using this code. So it is probably a not-work.

I did a lot of recommendations like this and I sworn not to do it again.

The result of this .php is:

This can be stripped down a bit more, all to do is to remove the theme_advanced_buttons1 entries as you like.

You might recognize the:

theme_advanced_styles :

and

content_css :

That’s my way to bring styles into tinyMCE.

The way I do is to double the default freeway css, give it another name, open it in CSSEdit (Espresso - I love it), remove all the not needed styles and point wy richtext element to this new css sheet. The first entry in theme_advanced_styles : is what shall occur in tinyMCE, the second is the style-name. So I insert in this much more css-styles (image, menu …)

Sounds complicate - in fact easy, but it is a way off the freeway-way of life.

Remove both lines if they are not needed. More infos probably tomorrow.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

ahhh - forgot to say:

the first script type line needs to be adjusted to your url, so not localhost bla but something like:

http://www.yourdomain.com/

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

this is looking promising. My personal wish would be, that the CMS developers would adopt a system like this to have their own texteditor - instead of using third parties stuff.

But it is most of the time not in users hand to choose an editor of their like, especially webyep would need some other files to integrate it. So actually it is reduced to the big two plus one (TinyMCE, CKEditor and the one that I forgot the name).

Mark,

I threw another line out (file browser call back), that you’d need (with another lines of code) to use an image-manager.

What I also forgot is, that the css path needs to be adjusted too. Well - yes, that’s the way I do and I agree 100% to you and Walter:

Leave the styling where it belongs, in your hands!

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve mentioned this one before though I don’t know if it will work with WY. If it doesn’t then it may be worth requesting from obdev. It’s fully customizable (show/hide/remove any of the toolbar buttons) and will generate the most standards-compliant code of any editor I’ve seen so far. It even does definition lists, if you need those.

http://www.xstandard.com/

Todd


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Thomas, Walter and Todd

Wow. This is going out of my comfort zone. Although XStandard looks like what I want - allowing me to remove most of the buttons from the editor.

When I get the chance I’ll try and see if it works with WY.

Thank you

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Wow. This is going out of my comfort zone. Although XStandard looks like what I want - allowing me to remove most of the buttons from the editor.

Mark,

I can’t speak about how WY implements 3rd Party editors but in my experience customizing the toolbar of the more common WYSIWYG plugin editors is not nearly as difficult as it might appear at first blush. You might be surprised.

Todd


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options