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

Multiple input fields using one common rich text editor

Expand Messages
  • yelaine11
    Hi, I m trying to build a web page with multiple input fields. It should be like: =====Rich Text Editor===== --input box --text area --text area ...
    Message 1 of 4 , Dec 7, 2008
    • 0 Attachment
      Hi, I'm trying to build a web page with multiple input fields. It
      should be like:
      <form>
      =====Rich Text Editor=====

      --input box
      --text area
      --text area
      ...

      </form>

      The rich text editor replaces <textarea> tag, so only one text area is
      generated in one editor. But my page need to have several input fields
      and use one common editor tool. How should I implement it? Can any of
      you give me suggestions? Thanks in advance=)
    • Eric Miraglia
      yelaine11, I d recommend starting with the following example: http://developer.yahoo.com/yui/examples/editor/multi_editor.html It uses divs, but the concept is
      Message 2 of 4 , Dec 7, 2008
      • 0 Attachment
        yelaine11,

        I'd recommend starting with the following example:


        It uses divs, but the concept is what you're after.  If you hit any snags implementing this with textareas, let us know.

        -Eric


        On Dec 7, 2008, at 10:45 AM, yelaine11 wrote:

        Hi, I'm trying to build a web page with multiple input fields. It
        should be like:
        <form>
        =====Rich Text Editor=====

        --input box
        --text area
        --text area
        ...

        </form>

        The rich text editor replaces <textarea> tag, so only one text area is
        generated in one editor. But my page need to have several input fields
        and use one common editor tool. How should I implement it? Can any of
        you give me suggestions? Thanks in advance=)


      • yelaine11
        Thank you Eric=) I read the example, it shows the way of creating multiple editors. There is still one textarea associated with one editor. Since all textareas
        Message 3 of 4 , Dec 8, 2008
        • 0 Attachment
          Thank you Eric=) I read the example, it shows the way of creating
          multiple editors. There is still one textarea associated with one
          editor. Since all textareas use same editing tool, can I have multiple
          textareas associated with one common editor? Thank you:)
        • Dav Glass
          yelaine11 -- On this page: http://developer.yahoo.com/yui/examples/editor/multi_editor.html Line 56 under Full Example JavaScript Source editing.innerHTML =
          Message 4 of 4 , Dec 8, 2008
          • 0 Attachment
            yelaine11 --

            On this page:
            http://developer.yahoo.com/yui/examples/editor/multi_editor.html

            Line 56 under "Full Example JavaScript Source"

            editing.innerHTML = myEditor.get('element').value;

            Change that to:
                
            editing.value = myEditor.get('element').value;

            Line 70:
            editing.innerHTML = myEditor.get('element').value;

            Change to:
                  editing.value = myEditor.get('element').value;

            Then line 75:

            myEditor.setEditorHTML(tar.innerHTML);

            Change that to:
                 myEditor.setEditorHTML(tar.value);

            That should make this example work for a textarea..

            Does that make sense?
            Dav

            --
            Dav Glass
            davglass@...
            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  +


            On Mon, Dec 8, 2008 at 4:33 AM, yelaine11 <yelaine11@...> wrote:

            Thank you Eric=) I read the example, it shows the way of creating
            multiple editors. There is still one textarea associated with one
            editor. Since all textareas use same editing tool, can I have multiple
            textareas associated with one common editor? Thank you:)


          Your message has been successfully submitted and would be delivered to recipients shortly.