Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] Re: RTE create link properties window not showing

Expand Messages
  • Dav Glass
    The RTE doesn t include that class by default, the example puts the class on the body.. Dav Dav Glass dav.glass@yahoo.com blog.davglass.com + Windows: n. - The
    Message 1 of 4 , Jun 29, 2008
      The RTE doesn't include that class by default, the example puts the class on the body..

      Dav

      Dav Glass
      dav.glass@...
      blog.davglass.com




      + Windows: n. - The most successful computer virus, ever. +
      + A computer without a Microsoft operating system is like a dog
      without bricks tied to its head +
      + A Microsoft Certified Systems Engineer is to computing what a
      McDonalds Certified Food Specialist is to fine cuisine +



      ----- Original Message ----
      From: nigel.soon <ns@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Sunday, June 29, 2008 7:04:11 PM
      Subject: [ydn-javascript] Re: RTE create link properties window not showing

      That worked, thanks!

      One more quick question, how does the iframe that contains the
      properties window know to include the class yui-skin-sam in the body
      tag? When I inspect the element from your examples I see this class is
      included but in my version it is not. I am using the yui-skin-sam in
      my example like so:

      <div class="container">
      <div id="skin" class="yui-skin-sam staff-ui">
      <textarea name="editor" id="editor" rows="8"></textarea>
      .
      .
      .
      </div>
      </div>

      Cheers,

      Nigel

      --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
      >
      > NIgel --
      >
      > Add this line of CSS:
      > .yui-editor-container {
      > z-index: 1;
      > }
      >
      > The example uses z-index: 999, and that hides the Editor window..
      >
      > Dav
      >
      > Dav Glass
      > dav.glass@...
      > blog.davglass.com
      >
      >
      >
      >
      > + Windows: n. - The most successful computer virus, ever. +
      > + A computer without a Microsoft operating system is like a dog
      > without bricks tied to its head +
      > + A Microsoft Certified Systems Engineer is to computing what a
      > McDonalds Certified Food Specialist is to fine cuisine +
      >
      >
      >
      > ----- Original Message ----
      > From: nigel.soon <ns@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Sunday, June 29, 2008 6:15:31 PM
      > Subject: [ydn-javascript] RTE create link properties window not showing
      >
      > Hi,
      >
      > I using the RTE and have done an implementation similar to the "One
      > editor, multiple edit areas" example. I have now added a button that
      > runs 'createlink' but I find when it is pushed the properties window
      > is not shown.
      >
      > Originally I thought the properties window may be rendered outside the
      > screen at position [-99999, -99999] but I tried it on Dave's example
      > from the YUI site and saw that it is showing under the RTE.
      >
      > Is there any way to make the create link properties show on top of the
      > RTE area?
      >
      > Below is the code I'm running.
      >
      > Thanks,
      >
      > Nigel
      >
      > // Editor
      > var myConfig = {
      > height: '150px',
      > width: '800px',
      > animate: true,
      > dompath: true,
      > autoHeight: true,
      > limitCommands: true,
      > toolbar: {
      > collapse: true,
      > titlebar: 'Text Editing Tools',
      > draggable: false,
      > buttonType: 'advanced',
      > buttons: [
      > { group: 'fontstyle', label: 'Font Size',
      > buttons: [
      > { type: 'spin', label: '13', value:
      > 'fontsize', range: [ 9, 75 ], disabled: true }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'textstyle', label: 'Font Style',
      > buttons: [
      > { type: 'push', label: 'Bold CTRL + SHIFT +
      > B', value: 'bold' },
      > { type: 'push', label: 'Italic CTRL + SHIFT +
      > I', value: 'italic' },
      > { type: 'push', label: 'Underline CTRL + SHIFT
      > + U', value: 'underline' },
      > { type: 'separator' },
      > { type: 'push', label: 'Subscript', value:
      > 'subscript', disabled: true },
      > { type: 'push', label: 'Superscript', value:
      > 'superscript', disabled: true }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'alignment', label: 'Alignment',
      > buttons: [
      > { type: 'push', label: 'Align Left CTRL +
      > SHIFT + [', value: 'justifyleft' },
      > { type: 'push', label: 'Align Center CTRL +
      > SHIFT + |', value: 'justifycenter' },
      > { type: 'push', label: 'Align Right CTRL +
      > SHIFT + ]', value: 'justifyright' }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'parastyle', label: 'Paragraph Style',
      > buttons: [
      > { type: 'select', label: 'Normal', value:
      > 'heading', disabled: true,
      > menu: [
      > { text: 'Normal', value: 'none', checked:
      > true },
      > { text: 'Header 1', value: 'h1' },
      > { text: 'Header 2', value: 'h2' },
      > { text: 'Header 3', value: 'h3' },
      > { text: 'Header 4', value: 'h4' },
      > { text: 'Header 5', value: 'h5' },
      > { text: 'Header 6', value: 'h6' }
      > ]
      > }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'indentlist', label: 'Indenting and Lists',
      > buttons: [
      > { type: 'push', label: 'Indent', value:
      > 'indent', disabled: true },
      > { type: 'push', label: 'Outdent', value:
      > 'outdent', disabled: true },
      > { type: 'push', label: 'Create an Unordered
      > List', value: 'insertunorderedlist' },
      > { type: 'push', label: 'Create an Ordered
      > List', value: 'insertorderedlist' }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'insertitem', label: 'Insert Item',
      > buttons: [
      > { type: 'push', label: 'HTML Link CTRL + SHIFT
      > + L', value: 'createlink', disabled: true },
      > { type: 'push', label: 'Insert Image', value:
      > 'insertimage' }
      > ]
      > },
      > { type: 'separator' },
      > { group: 'custom', label: ' ',
      > buttons: [
      > ]
      > }
      > ]
      > }
      > };
      >
      > myEditor = new YAHOO.widget.Editor('editor', myConfig);
      >
      > // Custom editor button (save, cancel)
      > myEditor.on('toolbarLoaded', function() {
      > Log("RTE: toolbar loaded ...");
      > var rte_cancel = {
      > type: 'push', label: 'Cancel', value: 'cancel'
      > };
      > myEditor.toolbar.addButtonToGroup(rte_cancel, 'custom');
      >
      > var rte_save = {
      > type: 'push', label: 'Save', value: 'save'
      > };
      > myEditor.toolbar.addButtonToGroup(rte_save, 'custom');
      >
      > myEditor.toolbar.on('saveClick', function(ev) {
      > Log("RTE saveClick");
      > Dom.setXY(this.get('element_cont').get('element'), [-99999,
      > -99999]);
      > Dom.removeClass(this.toolbar.get('cont').parentNode,
      > 'yui-toolbar-container-collapsed');
      > myEditor.saveHTML();
      > editing.innerHTML = myEditor.get('element').value;
      > var target_id = editing.id;
      > editing = null;
      > window.setTimeout(function() {
      > var fan = Dom.get('fan');
      > var sUrl = document.getElementById('staff_form').action;
      > var data = target_id + '=' +
      > encodeURIComponent(myEditor.get('textarea').value) + "&fan=" +
      fan.value;
      > var request = YAHOO.util.Connect.asyncRequest('POST',
      > sUrl, callback, data);
      > }, 200);
      > }, myEditor, true);
      >
      > myEditor.toolbar.on('cancelClick', function(ev) {
      > Log("RTE cancelClick");
      > Dom.setXY(this.get('element_cont').get('element'), [-99999,
      > -99999]);
      > Dom.removeClass(this.toolbar.get('cont').parentNode,
      > 'yui-toolbar-container-collapsed');
      > editing = null;
      > }, myEditor, true);
      > });
      >
      > myEditor.render();
      > Log("RTE: rendered ...");
      >
      > Event.on('staff_info_app', 'click', function(ev) {
      > var tar = Event.getTarget(ev);
      > if (Dom.hasClass(tar, 'edit_anchor')) {
      > Event.preventDefault(ev);
      > var newTar = Dom.getNextSibling(tar);
      > if (editing !== null) {
      > myEditor.saveHTML();
      > editing.innerHTML = myEditor.get('element').value;
      > }
      > var xy = Dom.getXY(newTar);
      > myEditor.setEditorHTML(newTar.innerHTML);
      > Dom.setXY(myEditor.get('element_cont').get('element'), xy);
      > editing = newTar;
      > }
      > });
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >



      ------------------------------------

      Yahoo! Groups Links
    Your message has been successfully submitted and would be delivered to recipients shortly.