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

test if selection is enclosed in a tag?

Expand Messages
  • Stephen Gilbert
    Hi gang, I was thinking about writing a clip CheckTagInclusion that detects whether the selected text is enclosed within a specified tag. Has anyone written
    Message 1 of 1 , May 20, 2003
    • 0 Attachment
      Hi gang,

      I was thinking about writing a clip CheckTagInclusion that detects
      whether the selected text is enclosed within a specified tag. Has
      anyone written this already?

      e.g. If I have the code:

      <chunk>Hi there. Here's something <strong>really</strong>
      interesting.</chunk>

      If select from start of "something" to end of "interesting" and then run
      CheckTagInclusion(^$GetSelection$) and specify "chunk" in a dialog box,
      it will return "1" for success. But if I run it and specify "strong",
      it will return 0 (failure).

      By the way, any clever way to send this clip both the selection and the
      tag to check for in its argument, e.g.
      CheckTagInclusion(^$GetSelection$; chunk)?

      Stephen

      --
      Stephen B. Gilbert, Ph.D.
      Cardean University
      gilbert@...
      847.405.7413 w
      847.444.8155 f
      ______________________________________________________

      This message is intended only for the use of the addressee(s) named
      herein. The information contained in this message is confidential and
      may constitute proprietary or inside information. Unauthorized review,
      dissemination, distribution, copying or other use of this message,
      including all attachments, is strictly prohibited and may be unlawful.
      If you have received this message in error, notify us immediately
      by return e-mail and destroy this message and all copies thereof,
      including all attachments.
    Your message has been successfully submitted and would be delivered to recipients shortly.