×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    2

    how to use the MEikRichTextEditorParserObserver in the rich text editor?

    I want to have sections in a text that behave like the href in html. The parser observer seems to be the answer. In the documentation:

    "Its HandleCursorOverParserL() function is called when the cursor is positioned over text that has been tagged by the parser, for instance a URL."

    But I can't find any more info on this. No examples, nothing... I'm blind?

    Any help, anyone? tanx

  2. #2
    Nokia Developer Expert
    Join Date
    Nov 2004
    Posts
    22

    MEikRichTextEditorParserObserver in the rich text editor?

    I am trying to make a similar thing where I am trying to parse a few data and image tags in the application can you help me if you have got a solution to this problem ...

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Rich Text Editor Observers

    Hi,

    HandleCursorOverParserL() is related to internal CEikParserManager and parser management inside the Richtext editor. To understand how rich text editor works with its observers, please use Nokia Communicator 9210 SDK DebugSource\ckon\ctlsrc content. I attach it here.

    Best Regards,
    (V) - Forum Nokia Developer Support
    Attached Files Attached Files

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Parser

    To get an understanding of the MEikEdwinObserver based
    CEikParserManager class, I copy the source and the header from the Nokia 9210 Communicator SDK here:

    class CEikParserManager : public CBase, public MEikEdwinObserver
    {
    public:
    static CEikParserManager* NewL(CEikRichTextEditor& aEditor);
    ~CEikParserManager();
    public:
    void SetParserObserver(MEikRichTextEditorParserObserver* aObserver);
    void Start(TInt aStartPos,TInt aLength);
    private:
    CEikParserManager(CEikRichTextEditor& aEditor);
    void ConstructL();
    void Start();
    void StartTimer();
    void Reset();
    static TInt ParseTextCallbackL(TAny* aSelf);
    void ParseTextL();
    private: // from MEikEdwinObserver
    void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
    private:
    CPeriodic* iTimer;
    CEikRichTextEditor& iEditor;
    MEikRichTextEditorParserObserver* iParserObserver;
    TInt iStartPos; // start of changed area
    TInt iLength; // length of changed area
    MParser* iParser;
    TInt iTagStart; // start of tag cursor is over
    TInt iTagLength; // length of tag cursor is over
    TBool iStateChanged;
    };

    I attach the source. It may not compile and varies between Nokia platforms, but it gives a general understanding how to create your parser.

    Best Regards,
    (V) - Forum Nokia Developer Support
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×