我完全意识到CoreOS主要是不可变的,因此在用户空间中没有安装任何内容。对于99%的用例,我同意。当我需要完成一些实际工作时,我正在使用CoreOS /工具箱,但我还需要稍微更新用户环境,以便我可以正确地使用Docker-ify我的开发环境。
答案 0 :(得分:11)
.bashrc是只读文件的符号链接。您所需要做的就是:
afterInit: function( editor ) {
//var placeholderReplaceRegex = /\[\[([^\[\]])+\]\]/g;
var placeholderReplaceRegex = /\{\{({^\{\}})+\}\}/g;
editor.dataProcessor.dataFilter.addRules( {
text: function( text, node ) {
var dtd = node.parent && CKEDITOR.dtd[ node.parent.name ];
// Skip the case when placeholder is in elements like <title> or <textarea>
// but upcast placeholder in custom elements (no DTD).
if ( dtd && !dtd.span )
return;
return text.replace( placeholderReplaceRegex, function( match ) {
// Creating widget code.
var widgetWrapper = null,
innerElement = new CKEDITOR.htmlParser.element( 'span', {
'class': 'cke_placeholder'
} );
// Adds placeholder identifier as innertext.
innerElement.add( new CKEDITOR.htmlParser.text( match ) );
widgetWrapper = editor.widgets.wrapElement( innerElement, 'placeholder' );
// Return outerhtml of widget wrapper so it will be placed
// as replacement.
return widgetWrapper.getOuterHtml();
} );
}
} );
}
希望有所帮助。
答案 1 :(得分:0)
我一定错过了什么。 CoreOS用户不包含.bashrc
文件,因此我可以将.profile
连接起来。我很惊讶CoreOS没有通过执行.profile做正确的事情,但因为我从未100%确定bash是如何开始的(我应该)。与此同时,我只创建了自己的.bashrc
文件:
# .bashrc
[[ -f ~/.profile ]] && . ~/.profile
它充分发挥作用。当然,我的.profile
与CoreOS alpha通道中的更改之间的任何不兼容都可能导致帐户无法运行。
here是一些很好的文档,我也误读了;引用这里:
3.1.2.3。 〜/ .profile中
在没有〜/ .bash_profile和〜/ .bash_login的情况下,〜/ .profile是 读。它可以保持相同的配置,然后也是如此 其他炮弹可以进入。请注意其他炮弹可能没有 理解Bash语法。