We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    Quote from: elz64 at Apr 01, 2008, 11:18 AM
    It’s just a matter of RTE, exactly at the same level as "width, height, position, etc." settings

    No it isn’t. These "settings" are attributes of an image element and can be written within the tag. A caption is always another element outside the image element. HTML doesn’t provide any element for "standard" captions of images. Therefore a designer must define how captions will be presented. Ofcourse a coder can write a snippet or module to handle and process the alt or title attribute of an image as a visible caption with an adequate formatting in the HTML source. But it’s dependent on your individual needs ...
      • 4018
      • 1,131 Posts
      @elz64: The thing you have to realize is that TinyMCE is more or less a simple HTML code editor. It wasn’t really designed with abstracts like captions for images in mind. TinyMCE is just a way to give people who don’t know jack about HTML a way to edit the content on their sites. TinyMCE, FCKEditor, and other editors deal with just the raw valid HTML elements. So in the case of images, it’s all about the IMG element.

      Now, one of the things you could do is use the ALT (alternate text) part of an image insert and use it to create the caption. By default, most browsers will show a small text popup of the alternate text. However, you can always use javascript to pickup this alternate text and do other things with it. I personally use the Mootools javascript library (www.mootools.net) for a lot of things and one script someone created with Mootools was a tooltip script. Check out the demo of it (http://www.chrisesler.com/mootools/mootools-tooltip.html).

      MODx is not a content management system, it’s a framework. That’s not to say that content management isn’t important. To me a system implies something that is a complete solution. MODx isn’t a complete solution in and of itself. It still requires other things to work. But what MODx does do is create the skeleton that other frameworks and solutions can lay on top of. MODx is very much about giving web developers and designers the most control over how their sites look and work.

      Something like image captions is a feature. It’s not a standard thing that every CMS and/or CMF has. Features like this are generally built as plugins and/or snippets in MODx. Anyone with a little development experience is encouraged to create solutions that combine the use of MODx concepts like snippets, template variables, plugins, and chunks) with other things like javascript and raw HTML code to create things like image captions. In and of itself, MODx doesn’t provide for features like this out of the box. Granted, some features are provided in the default installation but they are merely plugins and snippets that are bundled in the installer for convenience.

      Now, I guess the real question is, what is a caption? What does an image caption look like for you when it’s rendered on a page? Is it just a line of text that appears underneath an image? Or is it a text popup when a visitor hovers over the image? Exactly what is it? From a developers point of view, that’s where you start. You have to define what it is before you can create it.
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 8790
        • 526 Posts
        thank you Bravado.

        I’m not criticizing MODx, wich is a cmF, you’re right sure.

        From my point of view, an img caption’s feature could be modifying the img tag , embeding it into some container and adding somewhere in it, the title txt string (the ALT is not recommended , because it is supposed to describe what is the img, as the title is the real caption’s text.) Then, any css structuration will do what the developper would like.

        Once again (Rasc) this kind of feature is not part of MODx of course, but should be part of Tiny as a standard plugin. Tiny is nowdays used by so many cmS, so giving thru it the way for" end-user writers" the way to choose or not to add a caption under an img should exists.

        And I’m still very surprised no one add such a need before, that even no snippet (or plug-in ??) exists yet to deal with this directly with modx. I’ll see what can be done. (If accessible to my poor skills)
          Schtroumpf Grognon - Grouchy Smurf
          ---------------------------------
          Faites pas attention.. - Don't pay attention
          http://www.dzi-neo.net
          • 24495
          • 407 Posts
          If you want a standard plugin for TinyMCE ask at moxiecode. But I think you better need a plugin for MODx.

          You create the content of a page, insert images and fill the title attribute in TinyMCE’s image field with the caption text needed.
          Then a plugin collects all images of the page, looks for title attributes and renders the caption. The plugin is either "hardcoded" to format the caption on the right way or it is template-able to create the caption code together with the image element on individual needs.
          I’m not a coder and can’t help in this case. Good luck wink
            • 8790
            • 526 Posts
            yes, good luck, won’t be to much Iguess !! grin grin
              Schtroumpf Grognon - Grouchy Smurf
              ---------------------------------
              Faites pas attention.. - Don't pay attention
              http://www.dzi-neo.net
              • 4018
              • 1,131 Posts
              Quote from: elz64 at Apr 02, 2008, 02:20 AM

              From my point of view, an img caption’s feature could be modifying the img tag , embeding it into some container and adding somewhere in it, the title txt string (the ALT is not recommended , because it is supposed to describe what is the img, as the title is the real caption’s text.) Then, any css structuration will do what the developper would like.

              You could easily do that with Mootools for sure. I think as long as a user is adding the title attribute to the image then you could easily parse out the images, grab the title value, and add it to a container (DIV, P, etc). If you have some decent javascript skills it’s a breeze. smiley
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 8790
                • 526 Posts
                I’m affraid not being so decent... cool
                  Schtroumpf Grognon - Grouchy Smurf
                  ---------------------------------
                  Faites pas attention.. - Don't pay attention
                  http://www.dzi-neo.net
                  • 30497
                  • 245 Posts
                  Hi Everyone,

                  **EDIT**

                  ....the tinyMCE edit screen is not fully visible - the right side is "hidden" under the Manager tree. I can greatly reduce the manager tree width to see the whole of the TinyMCE screen.

                  **EDIT**

                  edit: found it was a silly error - I had a min-width in my CSS that was greater than the TinyMCE text entry area.

                    • 24495
                    • 407 Posts
                    Can’t find any thread/solution to this. With TinyMCE 3.0.3 I put images with an alternate description (alt attribute) and all works ok. If I left the alt blank I miss an empty attribute in source code like this:
                    <img src="#" alt="" width="100" height="100" />

                    Is it possible to force TinyMCE putting an empty alt if I left blank this field?
                      • 4018
                      • 1,131 Posts
                      That’s more of a question for the Moxiecode guys. Personally, I probably wouldn’t want empty alt attributes for my images. A lack of an alt attribute will definitely cause pages to fail validation for later HTML and XHTML specs. An empty one might still pass but it makes the image completely invisible to text readers and search engines. Better to have some kind of text telling what it is. In fact, TinyMCE will warn you if the description of the image is empty when you insert it. TinyMCE tries to stick with what the standards are and thus alternate text is only inserted when you add a description.
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."