kendo-editor

Prevent removing unnecessary white spaces in Kendo Editor

旧时模样 提交于 2019-12-14 03:22:25
问题 I'm using Kendo Editor to insert code snippets to content and it works very well, but when I want to change this formatted code, editor removes unnecessary white spaces, but in my use-case it's wrong. Have you any idea hot wo fix it? Print screen with new text in editor Print screen with edited text - wrong behaviour. Thank you guys. 回答1: Ok, I'm not found solution, but I found workaround - I'm inserting code into editor by <pre class="code">...</pre> and kendo stripps unnecessary white

Kendo UI Editor Events in Angularjs

守給你的承諾、 提交于 2019-12-12 17:45:31
问题 How do I get the event properties from the events in Kendo UI Editor? I've taken the code from the KendoDemo download and edited it a bit to get the events for k-on-change and k-on-keydown . The events are described here. <div id="example" ng-app="KendoDemos"> <div ng-controller="MyCtrl"> <textarea kendo-editor k-ng-model="html" k-on-keydown="keydown(e)" k-on-change="onChange(e)"></textarea> </div> </div> <script> angular.module("KendoDemos", [ "kendo.directives", "ngSanitize" ]) .controller(

Open kendo editor on hover also

坚强是说给别人听的谎言 提交于 2019-12-10 20:01:15
问题 I have Kendo grid with dropdowns, datepicker editor. It works fine except for the dropdown/datepicker editor open when i click on the block. Can there be a way so that the block be converted into editor form(datePicker/dropdown) on Hover also. Normal state image - > When i click on the date field , it changes to -> When i click on dropdown - > I want to the blocks to be converted into editor on hover itself and blocks should get back to normal state on blur. My editor template is function

Trim &nbsp values in javascript

余生长醉 提交于 2019-12-01 17:27:28
问题 I am trying to trim the text which I get from kendo editor like this. var html = "  T  "; // This sample text I get from Kendo editor console.log("Actual :" + html + ":"); var text = ""; try { // html decode var editorData = $('<div/>').html(html).text(); text = editorData.trim(); console.log("After trim :" + text + ":"); } catch (e) { console.log("exception"); text = html; } This code is in seperate js file ( generated from typescript). When the page loads the trimming is not working. But