Copy link to clipboard
Copied
I've noticed that there are many InDesign plugins on the market that can attach custom shapes to stored text content in InDesign. These shapes cannot be selected, edited, undone, or redone within InDesign. Currently, I have a requirement to attach such custom shapes after matching specified features in InDesign text.
I don't know what this is; I hope someone can help me. please
Copy link to clipboard
Copied
Hi @RDI33054067w5ck, it always helps if you can provide screen shots of what you want.
The requirement that they "cannot be selected, edited, undone, or redone within Indesign" is potentially difficult, because Indesign allows editing of pretty much everything that you can place on a page (even if the only possible edit is to remove it). Perhaps this ability would be part of the magic of the plugin?
And to clarify—you are asking if anyone knows the name of a plugin like that?
- Mark
Copy link to clipboard
Copied
The area circled with a red box in the image is the effect achieved by the plugin. When using it, clicking a button will make it appear in the corresponding position, and it cannot be selected or edited. Ctrl+Z has no effect on it."
Copy link to clipboard
Copied
I'd guess that the markers you show above are intrinsic to the purpose of the plug-in. But you seem to be asking for a plug-in that just provides the markers, without any explicit purpose. Therefore the plug-in would have to provide an interface for adding and removing the markers, or choosing under which conditions they should be added or removed. Am I understanding you right? If not, please elaborate. Actually, even if I am right, please elaborate! The more info you give, the better chance of useful help.
- Mark
Copy link to clipboard
Copied
The functionality is: I detect text in InDesign, find the words I want, and attach a custom shape or style to them. The requirement is that this shape or style cannot be modified by the user."
Copy link to clipboard
Copied
Hi @RDI33054067w5ck, still some questions come to mind:
1. You want a plug-in that can be configured (ie to allow *you*—but not the end-user—to "find the words [you] want, and attach ...") and then shows these to the end-user in uneditable form?
2. Do you expect this functionality to be built-in to the documents you create, using the plugin? Or will you be distributing the plugin to your end-users? Or both? Will you want your end-users to create a new document and type some text, and see *that detected text* marked by the plugin?
- Mark
Copy link to clipboard
Copied
There is a plugin called "Editmark" that does something similar
Copy link to clipboard
Copied
Copy link to clipboard
Copied
My English level is not high. This is all translation
Copy link to clipboard
Copied
No worries @RDI33054067w5ck, can you tell us why "EditMark" isn't what you want? Then we can understand further.
Copy link to clipboard
Copied
Hello @RDI33054067w5ck
From the screenshots, what you're looking for is indesign's "Track Changes". The marks are indications of the type of changes that have been made and are recorded in the document. That's why you said "they don't leave the document"...
.
There are basically three panel, configuration and editing points for the tool:
a) Windows " Editorial " Track Changes
b) Control(win)/Command(mac) + K " Track Changes
c) View in Stories Editor (Control(win)/Command(mac) + Y)
.
When you edit in the layout the marks are "hidden" but when you access the stories editor there they are!
.
I don't have any great tools for your answer, but I'll give you some guidance: what you're looking for is "Track Changes", not "shape markers". I think that makes it much easier for you to find something. Perhaps simply activating the tool will solve your problem...
Prints below:
In Stories Editor, on-off in panel Track Changes
in Preferences » Track Changes
to Panel Track Changes
Copy link to clipboard
Copied
This process can be quite intricate, but I'll outline the basic steps and a simple example to get you started:
Open the Scripting Panel: In InDesign, go to Window > Utilities > Scripts to open the Scripts panel.
Create a New Script: Right-click on the User folder and select New Script. Choose JavaScript as the language. This will open a text editor where you can write your script.
Script Basics: InDesign scripts typically start with referencing the active document and then perform actions on it. For attaching shapes to text, you'll need to locate the text and create shapes at the desired positions.
Example Script:
var myDocument = app.activeDocument;
var myTextFrames = myDocument.textFrames;
// Assuming you have at least one text frame
if (myTextFrames.length > 0) {
var myTextFrame = myTextFrames[0]; // Using the first text frame
// Loop through each character in the text frame
for (var i = 0; i < myTextFrame.contents.length; i++) {
var myCharacter = myTextFrame.characters.item(i);
// Create a shape for each character
var myOval = myDocument.ovals.add();
myOval.geometricBounds = [
myCharacter.baseline - 5, // y1 position
myCharacter.horizontalOffset - 5, // x1 position
myCharacter.baseline + 5, // y2 position
myCharacter.horizontalOffset + 5 // x2 position
];
}
}
Save and Run the Script: After writing your script, save it and run it from the Scripts panel in InDesign. The script above will create small oval shapes at the baseline of each character in the first text frame of your document.
Customization: You can customize the script to fit your specific needs, like changing the shape type, size, or position relative to the text.
Debugging: If the script doesn't work as expected, check the JavaScript Console (Window > Utilities > JavaScript Console) for error messages.
Remember, this is a basic example. Depending on your specific needs, such as if you want to attach shapes to specific words or phrases, or if you want to use different shapes or positions, the script will need to be more complex. Additionally, mastering InDesign scripting requires a good understanding of JavaScript and the InDesign scripting environment. Adobe provides extensive documentation on InDesign scripting, which can be very helpful for more advanced scripting tasks.
Copy link to clipboard
Copied
Hi @vegaprintltd, unfortunately in this case the OP is looking for a solution that doesn't use normal DOM objects because they can be edited/removed by the user.