Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

what protocol and subject I need to use to observe content change in text story

Contributor ,
Oct 27, 2024 Oct 27, 2024

HI All,

 

I am working on an indesign c++ plugin and looking for a solution for following scenario

what protocol and subject I need to use to observe content change in text story.

in autoattach, autodetach and update function

 

 

Regards,

Alam

TOPICS
SDK
288
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 28, 2024 Oct 28, 2024

You won't.

Instead use services, namely text preprocess or postprocess services.

Search for IID_ITEXTEDITPOSTPROCESS, kEditCmdPostProcessService, CTextCommandPostProcess

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 28, 2024 Oct 28, 2024

If this is for UI, you'd watch the selection instead, eventually even create an own suite.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 28, 2024 Oct 28, 2024

@alam_84

 

What exactly is your end goal?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 28, 2024 Oct 28, 2024

Hi Robert,

 

Suppose initially my text box has a content "Hello world" when user update (insert/delete) contents e.g "Hello world Welcome" then i should be notify about content change.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 28, 2024 Oct 28, 2024
quote

Hi Robert,

 

Suppose initially my text box has a content "Hello world" when user update (insert/delete) contents e.g "Hello world Welcome" then i should be notify about content change.


By @alam_84

 

I'm not into real plug-ins, but can't you just monitor built-in track changes functionality? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 28, 2024 Oct 28, 2024
LATEST

As of above, use kEditCmdPostProcessService to see the result.

If you want to interfere with the pending command before the change (change inserted text, adjust the applied range, filter modified text attributes), use the matching preprocess.

As a service, this catches all stories without attach/detach etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines