OscarGodson / EpicEditor

EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it.
http://epiceditor.com
MIT License
4.25k stars 334 forks source link

[Feature] {theme:false} = Ignore dynamic CSS #345

Closed ludoo0d0a closed 10 years ago

ludoo0d0a commented 10 years ago

If the website used minified CSS, then we don't want to include theme dynamically at the editor loading.

Could you update your code so that theme : false in options won't added any CSS. Responsibility to the user to add themes CSS himself.

Thanks

ludoo0d0a commented 10 years ago

[edit] Since EpicEditor is iframe, a link in theme option for the minified CSS would be just great !

OscarGodson commented 10 years ago

You can just set the theme options to empty or null or whatever. So theme.base: '', theme.preview: '', theme.editor: '' already I believe can't you?

OscarGodson commented 10 years ago

To your edit, same as above but set it to your css. There's more details in the docs.

ludoo0d0a commented 10 years ago

For null options, the issue is that _insertCSSLink will anyway add a tag for the CSS (no check if false/null)

OK, I see now the section about themes. and I understand that using a single minified for the 3 iframes is not probably the best way to do. i will think about this.

OscarGodson commented 10 years ago

@ludoo0d0a if you're doing caching you could include 3 of the same CSS files and it shouldn't really affect the load time much at all since you, and your browser, are going to be caching it