codemirror

How do I properly set up my systemjs.config for use with ng2-codemirror?

强颜欢笑 提交于 2019-12-11 04:45:31
问题 I am attempting to import the codemirror ng2 module for use in an angular 2 app I am writing, and running into some setup issues. In doing this, I'm trying to follow along with my ng2-datetime-picker import, which DID work. Here is my system.js.config (function (global) { System.config({ path: { 'npm:' : 'node_modules/' }, map: { app: 'app', // ..... // a bunch of angular libraries // ...... 'ng2-datetime-picker': 'npm:ng2-datetime-picker/dist', // this works 'ng2-codemirror: 'npm:ng2

form replaced to textarea not give different output

落爺英雄遲暮 提交于 2019-12-11 04:17:41
问题 I have two files index.php code.js I have some code in index.php which contains forms and with the help of code.js. I am replacing pre tag with that form. So everything runs fine. For understand my problem you have to see my code. So first of all I am giving my code index.php file: <html> <head> <link rel="stylesheet" href="http://code.guru99.com/css/1140.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://code.guru99.com/css/styles.css" type="text/css" media="screen" /

Cannot edit CodeMirror or Ace in a taskpane of an add-in in Excel for Windows

梦想与她 提交于 2019-12-10 23:59:30
问题 I just realized that we cannot modify texts in CodeMirror or Ace in a taskpane of an add-in in Excel for Windows. I have made a test html page with this code, and link it to a manifest file of an Excel add-in. It works well in Excel Online (in Chrome and IE), Excel for Mac. However, in Excel for Windows, 1) textarea works well; 2) We could put the focus on CodeMirror, whereas we can NOT type anything; 3) When we put the focus on Excel then back on Ace, we can NOT type anything. I have not

Use 2 ui-codemirrors in 1 controller

纵饮孤独 提交于 2019-12-10 17:47:16
问题 I am coding a very very basic playground by using AngularJS and ui-codemirror . Here is the code (JSBin). <html> <head> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.css"> <link rel="stylesheet" href="https://codemirror.net/lib/codemirror.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script> <script src="https://codemirror.net/lib/codemirror.js"></script> <script src="https:/

how can i retrieve a current value of textarea?

吃可爱长大的小学妹 提交于 2019-12-10 13:46:53
问题 Problem : So I have alerted the value of textarea by: var source = document.getElementById('source').value; alert(source); But the value of textarea is alerted as it was at the time of page load. And I want to alert current value of the textarea . I have also tried $("form").submit(function(){ But that also haven't helped me. So how can I do this? This is my code. <html> <head> <title>Perl WEB</title> <script type="text/javascript" src="http://code.guru99.com/Perl1/codemirror.js"></script>

CodeMirror . Disabling Vertical scroll bar

会有一股神秘感。 提交于 2019-12-10 12:49:07
问题 I am currently using CodeMirror to edit CODE in text area in browser. If i have more than 20 lines of code, it is adding a vertical scroll bar to right. But i do not need this scroll bar. Instead i need the editor size to grow vertically. Can anyone help ? 回答1: In CodeMirror 3, there is an option to disable the scrollbars : scrollbarStyle: "null" From the documentation : scrollbarStyle: string Chooses a scrollbar implementation. The default is "native", showing native scrollbars. The core

The height of the code-mirror block are not the same in Chrome and Safari

ぐ巨炮叔叔 提交于 2019-12-10 00:58:30
问题 I want to make a layout that satisfies the following conditions: 1) it has a block on the top whose height is up to its content 2) below it has a code-mirror and a block side by side, which fill in exactly the rest of the page in terms of height . I have made a plunker here. The problem is it works well in Chrome 57.0.2987.133 , whereas it does NOT work well in Safari 10.1 : the height of the code-mirror is NOT enough; it shows only 76 lines of the code rather than the correct 80 lines. Does

Changing jupyter's matching parenthesis color

半城伤御伤魂 提交于 2019-12-09 19:44:14
问题 How do I change the color of the matching parentheses in jupyter? Regular, square, and curly brackets all appear in bright green when they are shown as matching pairs and it is pretty difficult to see in light background. Modifying ~/.jupyter/custom/custom.css by adding .CodeMirror-matchingbracket doesn't seem to do anything for me. 回答1: In ~/.jupyter/custom/custom.css try adding the following: .cm-s-ipython .CodeMirror-matchingbracket { color: black !important;} If you don't want the color

How to reset Codemirror editor?

[亡魂溺海] 提交于 2019-12-09 16:32:55
问题 I would like to reset all the contents of the Codemirror editor. Ideally, this should clear the textarea, remove all marks and clear the history. What's the best way to achieve this? 回答1: cm.setValue(""); cm.clearHistory(); // cm.clearGutter("gutterId"); if you have gutters 回答2: If you don't want to kill the CodeMirror instance, just change the entire document holding the text, data on markers etc. This can be done by calling cm.swapDoc(doc: CodeMirror.Doc). 回答3: Also, doing cm.setValue

Codemirror cursor position offset

谁都会走 提交于 2019-12-09 13:35:11
问题 I'm using code mirror to display, highlight and edit xml in a web page but I am having a problem with the cursor position being offset from the insert position so that if you delete a character from where the blinking cursor is, a character before the one you would expect gets deleted instead. I am assuming its a css clash with my current page because it works well outside my page, but cant find the clash anywhere. Has anyone had similar issues or know what to do? 回答1: Further investigation