Community
Participate
Working Groups
Build Identifier: 3.6 Tab '\t' gets inserted on "Ctrl-I" action in Custom Editor extending StructuredTextEditor. This custom editor to display html content with support to proprietry scrippting launguge. The Ctrl-I key binding is binded to "Format Active Element" action. Whenever "Ctrl-I" action is performed in the editor, a '\t' character get inserted into the editor at cursor postion , it makes editor durty. Here is the code snippet for editor class public class CustomEditor extends StructuredTextEditor { ... } It has been observed that if i remove binding for "Format Active Element" from Windows>>Preference>>General>>Keys, issue get solved. Reproducible: Always Steps to Reproduce: 1.Extend StructuredTextEditor with your custom editor, bind editor to .html files 2.Open any editor file in the custom edior 3.Perform "Ctrl-I" operation.
Hi Yogesh, As you've mentioned, this is the keybinding for Format Active Element. The intent of this action is to correctly format the selected element in the source. So, that's why a tab character will get inserted in some cases. Could you please clarify what your problem is and what the expected outcome should be? Thanks.
(In reply to comment #1) > Hi Yogesh, > > As you've mentioned, this is the keybinding for Format Active Element. The > intent of this action is to correctly format the selected element in the > source. So, that's why a tab character will get inserted in some cases. Could > you please clarify what your problem is and what the expected outcome should > be? Thanks. Hi Nick, Our custom editor is extended text editor with levearge functionalities of HTML editor and add support for proprietary scripting language. Whenever "Ctrl-I" action performed on any part of editor, a '\t' character gets inserted, even if on empty line. When the same operation performed with some of the editor text selected, this '\t' charcter replace the selected text with itself. This behavior is not expected.The 'Ctrl-I" operation shohuld perform extected action whereever it really needs rather than inserting '\t' . Doesn't it make sence.
(In reply to comment #2) > The 'Ctrl-I" operation shohuld perform extected > action whereever it really needs rather than inserting '\t' . Doesn't it make > sence. The expected behavior with Ctrl+I in our HTML Editor *is* to "Format Active Element", and that appears to work correctly in the HTML Editor--it does not simply insert a tab character with each invocation. If you have custom formatting strategies set up, you should verify that they are functioning correctly.