-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrate ace.js settings with kibibit #118
Comments
Since this somewhat related to issue #83, We need to combine forces to make sure we both have the same idea about this |
here's the settings service after I refactored it. you should do something similar with the |
setter should do something only if the value changed. so, make sure to check before you do that.
that's a code problem and not a product problem, so we don't want to catch it gracefully. we want the settings to be as up to date as available. that's why, in the settings.__defineGetter__('isFullscreen', function() {
return currentFullscreenState();
}); instead of settings.__defineGetter__('isFullscreen', function() {
return isFullscreen;
}); and in the if(newValue !== currentFullscreenState()) {...} |
some more good resources to make editor do things: https://cdn.rawgit.com/whitelynx/web-pgq/master/static/js/directives/editor.js if you're changing our editor directive, you can (if you want), try and implement the scrollbars (ours is Malihu's jQuery Custom Scrollbar by Manos Malihutsakis), and update the cursor on the |
I also suggest that you'll seperate all editor's settings into a specific field. Something like: settings {
// general settings here
isFullscreen: true,
...
editorSettings: {
lineWrap: true,
...
}
} |
INTEGRATE ACE.JS SETTINGS WITH KIBIBIT
FEATURE
Basically, there are a lot of settings we want to expose to our user through the
menuBar
or asettings
modal we'll have in the future.We need to start and create functions that will change those settings in the
_editor
object we get from ace.basically, things like:
Basically, it will work in the following way:
the settings component should have
setters
andgetters
for everything. The logic should be inside the settings service and we should try and avoid as many of these from being done outside of the settings service.We need the settings service to have everything it needs from other open things to be able and do everything itself. So, it actually needs:
codeEditor
component, but I'm not sure if this is needed since each "code editor" will behave according to what it needs and will be in-charge pointing to it's own editor on creation.beyond that, we have everything else we need I think. We can discuss this more if you want to.
Therefore, I introduce the
setter-getter
approach! 🎉 :if you need help with this syntax, tell me and I'll try to help.
The text was updated successfully, but these errors were encountered: