| Page 1 of 1 | [ 10 posts ] |
|
Dav regarding your suggestions for editor buttons:
where to put this in simle editor widget code and do I have it right? myEditor._getWindow().print('print', {buttons: [{ type: 'push', label: 'Print', value: 'print' }, ]); and how/where to use myEditor.render(); to clear window? (print/clear buttons in editor toolbar is goal) Regarding your sam radio buttons: I've got code in head in <style type = "text/css"></style> tags and radio buttons <input type="radio" name="theme" value="grey" /> etc. in body. buttons are not showing style. tried body class sam skin tag around radio buttons that doesn't help either. also tried <input class="yui-radio-button" name="theme" value="grey" /> help please--thank you. |
|
|
|
thanks Dav for writing that example. I have simple editor set up minimally with just a few buttons, but toolbarLoaded loads all buttons, and putting var newGroup in various places within my existing code is not working. for example if I replace toolbarLoaded with just toolbar: and paste your code after or in button section of code, the editor doesn't render. so please advise how/where to put your code in existing javascript. thanks!
also source for png button icons? |
|
I can't tell you how to put it in your code because I can't see your code
The icons are from: http://iconlet.com/search?n=print http://iconlet.com/search?n=clear |
|
Dav thanks for the link to icons. Here is my code with your latest kind of mashed in I was experimenting. Thanks in advance
Code: var editor = new YAHOO.widget.SimpleEditor('msgpost', { height: '250px', width: '465px', dompath: true, animate: true, handleSubmit: true }); //editor.on('toolbarLoaded', function() { toolbar: { titlebar: 'Write something.', buttons: [ { group: 'textstyle', label: 'Font Style', buttons: [ { type: 'push', label: 'Bold', value: 'bold' }, { type: 'push', label: 'Italic', value: 'italic' }, { type: 'separator' }, { type: 'select', label: 'Arial', value: 'fontname', disabled: true, menu: [ { text: 'Arial', checked: true }, { text: 'Arial Black' }, { text: 'Comic Sans MS' }, { text: 'Courier New' }, { text: 'Lucida Console' }, { text: 'Tahoma' }, { text: 'Times New Roman' }, { text: 'Trebuchet MS' }, { text: 'Verdana' } ] }, { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }, { type: 'separator' }, { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true }, { type: 'color', label: 'Background Color', value: 'backcolor', disabled: false }, ] } ] }, //Create a new Group of buttons var newGroup = { group: 'clearprint', label: 'Clear/Print', buttons: [ //Add the Clear Button { type: 'push', label: 'Clear', value: 'clear' }, //Add the Print Button { type: 'push', label: 'Print', value: 'print' } ] }; //Add the group to the Toolbar editor.toolbar.addButtonGroup(newGroup); //Listen for the clear button click editor.toolbar.on('clearClick', function(ev) { //Clear the Editor editor.setEditorHTML(''); //Focus the Editor editor.focus(); }); //Listen for the Print button click editor.toolbar.on('printClick', function(ev) { //Tell the window to print. editor._getWindow().print(); }); }); editor.render(); |
|
Paul --
I don't want to sound "mean", but you may want to check out some of the videos in the YUI Theater: http://developer.yahoo.com/yui/theater/ That JS is nowhere near valid, you may need to learn a little more JS Anyway, here is a cleaned up version: http://gist.github.com/267843 |
|
Dav I've copied/pasted your new version and editor is not rendering--why I don't know but maybe you could shed some light.
I'm off to watch your Editor vid. YUI theater is great. Even what I have on my site now is beyond where I was with CSS. So thanks! |
|
I need to see the page, so give me a link and I will take a look.
|
|
almost there, but clear.png not showing: http://www.releasecenter.org
app is not running yet but at least the editor is cool! watched your editor vid. what's cool to think about is that as far as text and writer behavior is concerned this interface seems to have unlimited possibilities. |
|
It's not picking up the CSS for that rule, because you have an invalid comment above the rule:
Code: <!--print/clear buttons--> Should be: Code: /* print/clear buttons */ |
| Page 1 of 1 | [ 10 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group