This is a migrated thread and some comments may be shown as answers.

how to set defaultTools properties in Angular (SHIFT/ENTER behavior)

1 Answer 151 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 24 Sep 2014, 05:34 PM
Learning Angular, and have just begun to work with the directives version of Kendo UI.

On a documentation page I found the other day (but I've forgotten where it is) there is a code snippet that can be executed only at the initial configuration. The code changes the behavior of ENTER and SHIFT+ENTER:

var defaultTools = kendo.ui.Editor.defaultTools;
defaultTools["insertLineBreak"].options.shift = false;
defaultTools["insertParagraph"].options.shift = true;

Although I see in the Kendo Angular docs how to instantiate the tools config object via k-tools in the markup

<textarea ng-controller="foo" k-tools="[
              'bold',
              'italic',
              'underline',
        'strikethrough',
        'createLink',   
<snip>


I don't see how one would change specific properties of defaultTools in markup. How would the code above be implemented when using the Editor with Angular?
      







1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 25 Sep 2014, 09:10 AM
Hello Tim,

You can execute the snippet after loading the Kendo UI scripts, like shown in this Dojo snippet.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Editor
Asked by
Tim R
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or