Closed giacomodeliberali closed 8 years ago
Hi @deliberaligiacomo, Could you post your jspm config ?
map: { ..., "abalmus/aurelia-ace-editor": "github:abalmus/aurelia-ace-editor@master", "github:abalmus/aurelia-ace-editor@master": { "ace": "github:ajaxorg/ace-builds@1.2.3" }, ... }
@deliberaligiacomo, It looks good, I didn't try it with TS project, maybe this is the problem. Let me check it and get back to you.
Hi @deliberaligiacomo, I've just checked it with fresh TS skeleton app, it works pretty well even in safari.
please make sure you included styles into your project.
`
`
Can you give me a working piece of code? Because from the examples that i've seen I don't know where I'm wrong.
aurelia.use.plugin('abalmus/aurelia-ace-editor');
<style> .ace_editor { display: block; border: 1px solid lightgray; margin: auto; height: 300px; width: 100%; } </style>
<ace config-theme="ace/theme/monokai" config-mode="ace/mode/javascript" class="ace_editor"> console.log("content"); </ace>
Furthermore when i start typing, the content doesn't change, and the console signlas me an error (the last red line).
Yes sure.
aurelia.use.plugin('abalmus/aurelia-ace-editor');
And here is how I inserting editor component:
<style>
.ace_editor {
display: block;
border: 1px solid lightgray;
margin: auto;
height: 300px;
width: 100%;
}
</style>
<ace config-theme="ace/theme/eclipse"
config-mode="ace/mode/json">
{
"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}
}
</ace>
</template>```
That's seems equal to mine. Can't figure out what the problem is
I compressed my app, please run npm install && jspm install -y
skeleton-typescript.zip
after that I'm running gulp watch
It always giving me the same errors of above. Even your skeleton project. Ideas?
Yes after clear cache, I'm getting this errors in the console. Loos like some changes in new version of System.JS. I'll take a look today, it is something with System normalize url.
Hi @deliberaligiacomo,
could you please try to run jspm install ace
and see if it works after that?
Seems fixed, I had installed ace-builds with npm. Where did you find that jspm package?
github:ajaxorg/ace-builds
OK, seems good the plugin, but still can't render in safari browser. Am I missing any tricks?
In Safari 9.0.2 works well for me :(
Do you see nay errors in Safari ?
Ok fixed safari issue.
In my component i used your <style>
before <template>
. After moving that class inside global .less it's all fixed. Seems that safari ignores my <style>
inside the component <html>
. Thanks for the support, all closed.
After registring it as a plugin in main.ts, I can't figure out how to use this component. When i try to change mode/theme it search for it in wrong folder (http://localhost:8080/src/ace/theme-monokai.js, http://localhost:8080/src/ace/mode-javascript.js). How can i solve that?
Furthermore, the plugin doesnt render in safari browser. How can i fix that? Thanx in advance