Skip to content
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

Use MonadHandler constraint #3

Merged
merged 1 commit into from
Jun 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Yesod/Form/Summernote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ class Yesod a => YesodSummernote a where
-- @
-- snHtmlFieldCustomized "{ height: 150, codemirror: { theme:'monokai' } }"
-- @
snHtmlFieldCustomized :: YesodSummernote site
=> String -> Field (HandlerT site IO) Html
snHtmlFieldCustomized :: (YesodSummernote site, MonadHandler m)
=> String
-> Field (HandlerT site m) Html
snHtmlFieldCustomized cfg = Field
{ fieldParse =
\e _ -> return $
Expand Down Expand Up @@ -98,7 +99,8 @@ $(document).ready(function(){
showVal = either id (pack . renderHtml)

-- | Summernote editor field with default settings.
snHtmlField :: YesodSummernote site => Field (HandlerT site IO) Html
snHtmlField :: (YesodSummernote site, MonadHandler m)
=> Field (HandlerT site m) Html
snHtmlField = snHtmlFieldCustomized ""


Expand Down