Closed lodev09 closed 10 years ago
:+1: Great feature!
I think you should rebase this pull-request against upstream-master because, you have lot's of changes here that were already commited on master, that way we won't lose changes in the progress of merging this PR in master! + it's quite difficult to see what changes exactly are related to this PR. A rebase should solve this
I already rebased this and made updates based from the current v2.6.0
's code
hmm strange.. the commit tab shows a lot of commits which are already merged in master
Indeed. But the current version I was working on was 2.6.0.
@lodev09 your fork hash display This branch is 23 commits ahead, 28 commits behind
warning. git merge
should resolve it.
Try now @toopay
@lodev09 please fix the classes for the switch-theme and exit-fullscreen so we add support for all the icon fonts. Thanks!
Added.. Below are the default configuration
...
fullscreen: {
enable: true,
icons: {
fullscreenOn: {
fa: 'fa fa-expand',
glyph: 'glyphicon glyphicon-fullscreen',
'fa-3': 'icon-resize-full'
},
fullscreenOff: {
fa: 'fa fa-compress',
glyph: 'glyphicon glyphicon-fullscreen',
'fa-3': 'icon-resize-small'
},
switchTheme: {
fa: 'fa fa-adjust',
glyph: 'glyphicon glyphicon-adjust',
'fa-3': 'icon-adjust'
}
},
theme: '' // you can put "dark" for now
}
...
@lodev09 Several notes :
fullscreen
to appropriate place. Any methods which prefixed with __
are intended to use internally, while the other are exposed via markdown instance.showFullscreen
is fine (similar with showPreview
)isFullscreen
into class property and...onFullscreen
seems to be logical css/bootstrap-markdown.min.css
? Lets adding something like this properly so we doesn't break the clarity of the code as it getting bigger.
Cheers.
I've renamed it setFullscreen
since it's taking an argument bool mode
arg.
Wonderful. Thanks.
One more point thou. I'm still not sure whether theme
related code are required for this PR. I prefer to have the vanilla version of fullscreen feature to keep the code not having very firm ideas about how things ought to be done. I can see you're providing an option that makes it configurable, but i'm not seeing that should be within core logic, instead we can provides hook for that (onFullscreen
), and let the user do whatever they need to do. Thought?
I guess your right.. I just thought we could incorporate additional theme in the future (by just adding stuff in css) and let that property be the default theme of the fullscreen layout
Great. Lets remove any theme related block and this PR can be merged.
@toopay done.
I've also added a block into the keyup
event for escape
. It closes the fullscreen when pressed.
Thanks @lodev09 !
No problem!
This is a beta support for fullscreen. I was working on my project and would be nice to have a fullscreen feature so I added one. :smile:
Here is sample plunk: http://embed.plnkr.co/atyuBnVNktl8YSfdfPJT/preview