Angularjs angular-ui-ace编辑器选项卡键不起作用和拼写错误的选项

时间:2016-08-05 15:14:58

标签: angularjs ace-editor

的问题:

  1. 当我将ace编辑器设置为html模式时,tab键不再是标签。
  2. 当我尝试设置选项时,我收到以下错误消息/ s
  3. 拼写错误的选项“enableLiveAutocompletion”

    拼写错误的选项“enableEmmet”

    我的bower.json看起来像这样

    {
        "name": "fountain-inject",
        "version": "0.0.1",
        "dependencies": {
            "jquery": "^3.1.0",
            "angular": "^1.5.0",
            "angular-ui-router": "^0.3.1",
            "angular-dragula": "^1.2.7",
            "medium-editor": "^5.21.0",
            "angular-ui-ace": "bower"
        },
        "overrides": {
            "ace-builds": {
                "main": ["src-noconflict/ace.js",
                    "src-noconflict/ext-language_tools.js",
                    "src-noconflict/theme-monokai.js",
                    "src-noconflict/mode-html.js",
                    "src-noconflict/ext-emmet.js"
                ]
    
            },
            "devDependencies": {
                "angular-mocks": "^1.5.0"
            }
        }
    }
    

    我的代码看起来像这样

    _editor.setTheme("ace/theme/monokai");
    _editor.getSession().setMode("ace/mode/html");
    _editor.getSession().setOptions({
        "enableBasicAutocompletion": true,
        "enableSnippets": true,
        "enableLiveAutocompletion": false,
        "enableEmmet": true
    });
    

    我的html(这是一个'视图')

    <div class='parent' ng-controller='Main'>
    <div class='wrapper'>
        <div class='container' dragula='"fifth-bag"'>
            <div data-type="a">A</div>
            <div data-type="b">B</div>
            <div data-type="c">C</div>
        </div>
        <div id="dragulaCopyWithSort" class='container' dragula='"fifth-bag"'>
        </div>
        <div ui-ace="{ 
        onLoad: aceLoaded,
        onChange: aceChanged
        }">ace</div>
    </div>
    

0 个答案:

没有答案