• How about validation?

    By Steve Cochrane 1 decade ago

    Hello!

       I have it set up and it works well!  I can play with it to remove and add different buttons, too.  In IBM's basic rich text control, there is a "required" attribute, and you can add validators.  So, how can we make sure that a user has entered something  in the TinyMCE editor in order to submit the document?

    Thanks!

    Steve in NYC

    • Try this

      By Fredrik Norling 1 decade ago

      The richtext field is bound to a viewscope variable named the same as your richtext field.

      You could check if the viewScope variable is empty or I think empty is actually

       I haven't tried this but I think it would work.

      fieldname comment in the tinymce definition

      viewScope.comment

      • Thanks! Not so sure...

        By Steve Cochrane 1 decade ago

        Thank you for getting back to me so quick.  I'm using a formTable, and each mandatory field gets the red line of customizable text along side it, to let the user know it's mandatory.  This also works with traditional rich text controls.

        I'm also trying to set it so that once the originator sends it forward in the workflow, the content can be read, but not modified.  The out of the box rich text control has a "read only" feature which I can use for this, too.

        Any ideas on having client side validation, as in other fields in a formTable?  How about a read only mode?  Or, maybe I'm trying to use this control for a too complex application?

        Thanks, in advance!

        Steve

        • Release 1.3 has field validations

          By Fredrik Norling 1 decade ago

          Hi Steve,

          Version 1.3 of the tiny mce co ntrol now has field validations built in just add the properties and field validation works.

          Check out the Document_Validation XPage.

          TinyMce is a very good editor and I have used it in very large projects. QNova the company where I work uses this as an richtext editor replacement in many of our products.

           

      • Read only working!

        By Steve Cochrane 1 decade ago

        Hello!

           I'm somewhat new to this stuff (but doing web based Notes stuff since 4.6), and this is what I did for the read only variable.  I rely on an integer I keep to decide what the status is.  So, I created a new cc property for the status number, and changed the visibility for the editable and computed field for the value of the RichTextFieldName.

           With this, I'll be able to figure out the validation, now that I know how you set up the viewScope for the RichTextFieldName.

        Take care & thanks, again!

        Steve in NYC