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

Rich Text Editor: Tables & Undo

Expand Messages
  • Dale Burrell
    Hi Guys, From looking through the docs it would appear that there is no table features available in the rich text editor - is this correct? Also it would look
    Message 1 of 7 , Apr 1, 2008
    • 0 Attachment
      Hi Guys,

      From looking through the docs it would appear that there is no table features available in the rich text editor - is this correct?

      Also it would look like there is no undo/redo function - is this correct?

      Cheers,

      Dale



      Send instant messages to your online friends http://au.messenger.yahoo.com
    • Dav Glass
      Dale -- Table support and Undo/Redo is not in the current feature set, however there have already been feature requests added for them.. Dav Dav Glass
      Message 2 of 7 , Apr 1, 2008
      • 0 Attachment
        Dale --

        Table support and Undo/Redo is not in the current feature set, however there have already been feature requests added for them..

        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: Dale Burrell <dale_burrell@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, April 1, 2008 5:32:52 PM
        Subject: [ydn-javascript] Rich Text Editor: Tables & Undo

        Hi Guys,

        From looking through the docs it would appear that there is no table features available in the rich text editor - is this correct?

        Also it would look like there is no undo/redo function - is this correct?

        Cheers,

        Dale



        Send instant messages to your online friends http://au.messenger.yahoo.com

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

        Yahoo! Groups Links
      • Eric Miraglia
        Dale, Note that, in some browsers, there is a degree of built-in undo -- for example, if you delete the full contents of the editor and then use cmd-z, you can
        Message 3 of 7 , Apr 1, 2008
        • 0 Attachment
          Dale,

          Note that, in some browsers, there is a degree of built-in undo -- for example, if you delete the full contents of the editor and then use cmd-z, you can recover the text; some styling operations are supported.

          Regards,
          Eric


          On Apr 1, 2008, at 8:29 PM, Dav Glass wrote:

          Dale --

          Table support and Undo/Redo is not in the current feature set, however there have already been feature requests added for them..

          Dav

          Dav Glass
          dav.glass@yahoo. com
          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: Dale Burrell <dale_burrell@ yahoo.com>
          To: ydn-javascript@ yahoogroups. com
          Sent: Tuesday, April 1, 2008 5:32:52 PM
          Subject: [ydn-javascript] Rich Text Editor: Tables & Undo

          Hi Guys,

          From looking through the docs it would appear that there is no table features available in the rich text editor - is this correct?

          Also it would look like there is no undo/redo function - is this correct?

          Cheers,

          Dale

          Send instant messages to your online friends http://au.messenger .yahoo.com 

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

          Yahoo! Groups Links


        • Dale Burrell
          Thanks Eric - you re right - and I guess I could add a toolbar button which fires off that key-press if I felt so inclined. Cheers, ... From: Eric Miraglia
          Message 4 of 7 , Apr 1, 2008
          • 0 Attachment
            Thanks Eric - you're right - and I guess I could add a toolbar button which fires off that key-press if I felt so inclined.

            Cheers,

            ----- Original Message ----
            From: Eric Miraglia <miraglia@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Wednesday, 2 April, 2008 4:34:26 PM
            Subject: Re: [ydn-javascript] Rich Text Editor: Tables & Undo

            Dale,


            Note that, in some browsers, there is a degree of built-in undo -- for example, if you delete the full contents of the editor and then use cmd-z, you can recover the text; some styling operations are supported.

            Regards,
            Eric


            On Apr 1, 2008, at 8:29 PM, Dav Glass wrote:

            Dale --

            Table support and Undo/Redo is not in the current feature set, however there have already been feature requests added for them..

            Dav

            Dav Glass
            dav.glass@yahoo. com
            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: Dale Burrell <dale_burrell@ yahoo.com>
            To: ydn-javascript@ yahoogroups. com
            Sent: Tuesday, April 1, 2008 5:32:52 PM
            Subject: [ydn-javascript] Rich Text Editor: Tables & Undo

            Hi Guys,

            From looking through the docs it would appear that there is no table features available in the rich text editor - is this correct?

            Also it would look like there is no undo/redo function - is this correct?

            Cheers,

            Dale

            Send instant messages to your online friends http://au.messenger .yahoo.com 

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

            Yahoo! Groups Links




            Send instant messages to your online friends http://au.messenger.yahoo.com
          • jeremymefford
            I was required by my company to add support for a table in the rich text editor, so while I m waiting for Dav s superior solution, I did some modification in
            Message 5 of 7 , Apr 2, 2008
            • 0 Attachment
              I was required by my company to add support for a table in the rich
              text editor, so while I'm waiting for Dav's superior solution, I did
              some modification in my code that seems to work pretty well.

              I just created a form:

              createTableHTML = '<fieldset>' +
              '<legend><b>Create
              Table</b></legend>' +
              'Rows: <input type="text"
              size="1" id="tableRows' + this.id + '" value="3">' +
              'Columns: <input type="text"
              size="1" id="tableColumns' + this.id + '" value="3"><br>' +
              'Width: <input type="text"
              size="1" id="tableWidth' + this.id + '" value=""> ' +
              'Height: <input type="text"
              size="1" id="tableHeight' + this.id + '" value=""><br>' +
              'Border Size: <input
              type="text" size="1" id="tableBorderSize' + this.id + '" value="1"><br>' +
              'Cell Spacing: <input
              type="text" size="1" id="tableCellspacing' + this.id + '"
              value="0"><br>' +
              'Cell Padding: <input
              type="text" size="1" id="tableCellpadding' + this.id + '" value="0">' +
              '<div align="right"><input
              type="button" id="tableCreate' + this.id + '" value="Create"></div>' +
              '</fieldset>';

              (You can remove the this.id... I had to make sure that this form
              created specific for each instance of the text editor I had on the
              page...) and then I just made some simple script to handle the submit:

              var tableCreateButton = new YAHOO.widget.Button('tableCreate' + this.id);
              tableCreateButton.on('click', function() {
              var rows =
              document.getElementById('tableRows' + this.id).value.match('[0-9]+') ?
              document.getElementById('tableRows' + this.id).value : 3;
              var columns =
              document.getElementById('tableColumns' +
              this.id).value.match('[0-9]+') ?
              document.getElementById('tableColumns' + this.id).value : 3;
              var borderSize =
              document.getElementById('tableBorderSize' +
              this.id).value.match('[0-9]+') ?
              document.getElementById('tableBorderSize' + this.id).value : 1;
              var cellspacing =
              document.getElementById('tableCellspacing' +
              this.id).value.match('[0-9]+') ?
              document.getElementById('tableCellspacing' + this.id).value : 0;
              var cellpadding =
              document.getElementById('tableCellpadding' +
              this.id).value.match('[0-9]+') ?
              document.getElementById('tableCellpadding' + this.id).value : 0;
              var width =
              document.getElementById('tableWidth' + this.id).value.match('[0-9]+')
              ? document.getElementById('tableWidth' + this.id).value : 0;
              var height =
              document.getElementById('tableHeight' + this.id).value.match('[0-9]+')
              ? document.getElementById('tableHeight' + this.id).value : 0;
              var tableHTML = '<table border="' +
              borderSize + '" cellspacing="' + cellspacing + '" cellpadding="' +
              cellpadding + '" height="' + height + '" width="' + width + '"><tbody>';
              //Build table
              for (var i = 0;i < rows;i++) {
              tableHTML += '<tr>\n';
              for (var j = 0;j < columns;j++) {
              tableHTML += '<td> </td>\n';
              }
              tableHTML += '</tr>\n';
              }
              tableHTML += '</tbody></table>';
              this.myEditor.execCommand('inserthtml',
              tableHTML);
              this.createTablePanel.hide();

              Again, my regex isn't perfect, and I use the this.id a lot. You can
              just remove those.

              And then I just added the panel to a button in my rich text editor:

              http://blog.davglass.com/files/yui/editor14/

              Anyway, it worked perfect for my needs. Once the table is inside the
              RTE it is resizable, and you can highlight / delete cells and rows.

              Best
              Jeremy Mefford

              --- In ydn-javascript@yahoogroups.com, Dale Burrell <dale_burrell@...>
              wrote:
              >
              > Hi Guys,
              >
              > From looking through the docs it would appear that there is no table
              features available in the rich text editor - is this correct?
              >
              > Also it would look like there is no undo/redo function - is this
              correct?
              >
              > Cheers,
              >
              > Dale
              >
              >
              >
              > Send instant messages to your online friends
              http://au.messenger.yahoo.com
              >
            • Dav Glass
              Jeremy -- You should note that this solution will only work in IE and FF.. Safari and Opera doesn t fully have support for tables inside the Editor ;) Dav Dav
              Message 6 of 7 , Apr 2, 2008
              • 0 Attachment
                Jeremy --

                You should note that this solution will only work in IE and FF.. Safari and Opera doesn't fully have support for tables inside the Editor ;)

                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: jeremymefford <jeremymefford@...>
                To: ydn-javascript@yahoogroups.com
                Sent: Wednesday, April 2, 2008 10:55:40 AM
                Subject: [ydn-javascript] Re: Rich Text Editor: Tables & Undo

                I was required by my company to add support for a table in the rich
                text editor, so while I'm waiting for Dav's superior solution, I did
                some modification in my code that seems to work pretty well.

                I just created a form:

                createTableHTML = '<fieldset>' +
                '<legend><b>Create
                Table</b></legend>' +
                'Rows: <input type="text"
                size="1" id="tableRows' + this.id + '" value="3">' +
                'Columns: <input type="text"
                size="1" id="tableColumns' + this.id + '" value="3"><br>' +
                'Width: <input type="text"
                size="1" id="tableWidth' + this.id + '" value=""> ' +
                'Height: <input type="text"
                size="1" id="tableHeight' + this.id + '" value=""><br>' +
                'Border Size: <input
                type="text" size="1" id="tableBorderSize' + this.id + '" value="1"><br>' +
                'Cell Spacing: <input
                type="text" size="1" id="tableCellspacing' + this.id + '"
                value="0"><br>' +
                'Cell Padding: <input
                type="text" size="1" id="tableCellpadding' + this.id + '" value="0">' +
                '<div align="right"><input
                type="button" id="tableCreate' + this.id + '" value="Create"></div>' +
                '</fieldset>';

                (You can remove the this.id... I had to make sure that this form
                created specific for each instance of the text editor I had on the
                page...) and then I just made some simple script to handle the submit:

                var tableCreateButton = new YAHOO.widget.Button('tableCreate' + this.id);
                tableCreateButton.on('click', function() {
                var rows =
                document.getElementById('tableRows' + this.id).value.match('[0-9]+') ?
                document.getElementById('tableRows' + this.id).value : 3;
                var columns =
                document.getElementById('tableColumns' +
                this.id).value.match('[0-9]+') ?
                document.getElementById('tableColumns' + this.id).value : 3;
                var borderSize =
                document.getElementById('tableBorderSize' +
                this.id).value.match('[0-9]+') ?
                document.getElementById('tableBorderSize' + this.id).value : 1;
                var cellspacing =
                document.getElementById('tableCellspacing' +
                this.id).value.match('[0-9]+') ?
                document.getElementById('tableCellspacing' + this.id).value : 0;
                var cellpadding =
                document.getElementById('tableCellpadding' +
                this.id).value.match('[0-9]+') ?
                document.getElementById('tableCellpadding' + this.id).value : 0;
                var width =
                document.getElementById('tableWidth' + this.id).value.match('[0-9]+')
                ? document.getElementById('tableWidth' + this.id).value : 0;
                var height =
                document.getElementById('tableHeight' + this.id).value.match('[0-9]+')
                ? document.getElementById('tableHeight' + this.id).value : 0;
                var tableHTML = '<table border="' +
                borderSize + '" cellspacing="' + cellspacing + '" cellpadding="' +
                cellpadding + '" height="' + height + '" width="' + width + '"><tbody>';
                //Build table
                for (var i = 0;i < rows;i++) {
                tableHTML += '<tr>\n';
                for (var j = 0;j < columns;j++) {
                tableHTML += '<td> </td>\n';
                }
                tableHTML += '</tr>\n';
                }
                tableHTML += '</tbody></table>';
                this.myEditor.execCommand('inserthtml',
                tableHTML);
                this.createTablePanel.hide();

                Again, my regex isn't perfect, and I use the this.id a lot. You can
                just remove those.

                And then I just added the panel to a button in my rich text editor:

                http://blog.davglass.com/files/yui/editor14/

                Anyway, it worked perfect for my needs. Once the table is inside the
                RTE it is resizable, and you can highlight / delete cells and rows.

                Best
                Jeremy Mefford

                --- In ydn-javascript@yahoogroups.com, Dale Burrell <dale_burrell@...>
                wrote:
                >
                > Hi Guys,
                >
                > From looking through the docs it would appear that there is no table
                features available in the rich text editor - is this correct?
                >
                > Also it would look like there is no undo/redo function - is this
                correct?
                >
                > Cheers,
                >
                > Dale
                >
                >
                >
                > Send instant messages to your online friends
                http://au.messenger.yahoo.com
                >



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

                Yahoo! Groups Links
              • jeremymefford
                Dav- Thanks for the heads up. Luckily I don t have to support those browsers (internal application that I m building), but I ll keep that in mind. I look
                Message 7 of 7 , Apr 2, 2008
                • 0 Attachment
                  Dav-

                  Thanks for the heads up. Luckily I don't have to support those
                  browsers (internal application that I'm building), but I'll keep that
                  in mind. I look forward to your implementation of the table.

                  Thanks-
                  Jeremy

                  --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
                  >
                  > Jeremy --
                  >
                  > You should note that this solution will only work in IE and FF..
                  Safari and Opera doesn't fully have support for tables inside the
                  Editor ;)
                  >
                  > 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: jeremymefford <jeremymefford@...>
                  > To: ydn-javascript@yahoogroups.com
                  > Sent: Wednesday, April 2, 2008 10:55:40 AM
                  > Subject: [ydn-javascript] Re: Rich Text Editor: Tables & Undo
                  >
                  > I was required by my company to add support for a table in the rich
                  > text editor, so while I'm waiting for Dav's superior solution, I did
                  > some modification in my code that seems to work pretty well.
                  >
                  > I just created a form:
                  >
                  > createTableHTML = '<fieldset>' +
                  > '<legend><b>Create
                  > Table</b></legend>' +
                  > 'Rows: <input type="text"
                  > size="1" id="tableRows' + this.id + '" value="3">' +
                  > 'Columns: <input type="text"
                  > size="1" id="tableColumns' + this.id + '" value="3"><br>' +
                  > 'Width: <input type="text"
                  > size="1" id="tableWidth' + this.id + '" value=""> ' +
                  > 'Height: <input type="text"
                  > size="1" id="tableHeight' + this.id + '" value=""><br>' +
                  > 'Border Size: <input
                  > type="text" size="1" id="tableBorderSize' + this.id + '"
                  value="1"><br>' +
                  > 'Cell Spacing: <input
                  > type="text" size="1" id="tableCellspacing' + this.id + '"
                  > value="0"><br>' +
                  > 'Cell Padding: <input
                  > type="text" size="1" id="tableCellpadding' + this.id + '" value="0">' +
                  > '<div align="right"><input
                  > type="button" id="tableCreate' + this.id + '" value="Create"></div>' +
                  > '</fieldset>';
                  >
                  > (You can remove the this.id... I had to make sure that this form
                  > created specific for each instance of the text editor I had on the
                  > page...) and then I just made some simple script to handle the submit:
                  >
                  > var tableCreateButton = new YAHOO.widget.Button('tableCreate' +
                  this.id);
                  > tableCreateButton.on('click', function() {
                  > var rows =
                  > document.getElementById('tableRows' + this.id).value.match('[0-9]+') ?
                  > document.getElementById('tableRows' + this.id).value : 3;
                  > var columns =
                  > document.getElementById('tableColumns' +
                  > this.id).value.match('[0-9]+') ?
                  > document.getElementById('tableColumns' + this.id).value : 3;
                  > var borderSize =
                  > document.getElementById('tableBorderSize' +
                  > this.id).value.match('[0-9]+') ?
                  > document.getElementById('tableBorderSize' + this.id).value : 1;
                  > var cellspacing =
                  > document.getElementById('tableCellspacing' +
                  > this.id).value.match('[0-9]+') ?
                  > document.getElementById('tableCellspacing' + this.id).value : 0;
                  > var cellpadding =
                  > document.getElementById('tableCellpadding' +
                  > this.id).value.match('[0-9]+') ?
                  > document.getElementById('tableCellpadding' + this.id).value : 0;
                  > var width =
                  > document.getElementById('tableWidth' + this.id).value.match('[0-9]+')
                  > ? document.getElementById('tableWidth' + this.id).value : 0;
                  > var height =
                  > document.getElementById('tableHeight' + this.id).value.match('[0-9]+')
                  > ? document.getElementById('tableHeight' + this.id).value : 0;
                  > var tableHTML = '<table border="' +
                  > borderSize + '" cellspacing="' + cellspacing + '" cellpadding="' +
                  > cellpadding + '" height="' + height + '" width="' + width + '"><tbody>';
                  > //Build table
                  > for (var i = 0;i < rows;i++) {
                  > tableHTML += '<tr>\n';
                  > for (var j = 0;j < columns;j++) {
                  > tableHTML += '<td> </td>\n';
                  > }
                  > tableHTML += '</tr>\n';
                  > }
                  > tableHTML += '</tbody></table>';
                  > this.myEditor.execCommand('inserthtml',
                  > tableHTML);
                  > this.createTablePanel.hide();
                  >
                  > Again, my regex isn't perfect, and I use the this.id a lot. You can
                  > just remove those.
                  >
                  > And then I just added the panel to a button in my rich text editor:
                  >
                  > http://blog.davglass.com/files/yui/editor14/
                  >
                  > Anyway, it worked perfect for my needs. Once the table is inside the
                  > RTE it is resizable, and you can highlight / delete cells and rows.
                  >
                  > Best
                  > Jeremy Mefford
                  >
                  > --- In ydn-javascript@yahoogroups.com, Dale Burrell <dale_burrell@>
                  > wrote:
                  > >
                  > > Hi Guys,
                  > >
                  > > From looking through the docs it would appear that there is no table
                  > features available in the rich text editor - is this correct?
                  > >
                  > > Also it would look like there is no undo/redo function - is this
                  > correct?
                  > >
                  > > Cheers,
                  > >
                  > > Dale
                  > >
                  > >
                  > >
                  > > Send instant messages to your online friends
                  > http://au.messenger.yahoo.com
                  > >
                  >
                  >
                  >
                  > ------------------------------------
                  >
                  > Yahoo! Groups Links
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.