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

CRM-18257: WYSIWYG fullPage config option #7993

Merged
merged 3 commits into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions ang/crmMailing/BodyHtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
crm-ui-insert-rx="insert:body_html"
ng-model="mailing.body_html"
ng-blur="checkTokens(mailing, 'body_html', 'insert:body_html')"
class="crm-wysiwyg-fullpage"
></textarea>
<span ng-model="body_html_tokens" crm-ui-validate="hasAllTokens(mailing, 'body_html')"></span>
<div ng-show="htmlForm.$error.crmUiValidate" class="crmMailing-error-link">
Expand Down
6 changes: 6 additions & 0 deletions js/wysiwyg/crm.ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@

$(item).addClass('crm-wysiwyg-enabled');

var isFullPage = false;
if ($(item).hasClass('crm-wysiwyg-fullpage')) {
isFullPage = true;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 4 lines could be condensed to var isFullPage = $(item).hasClass('crm-wysiwyg-fullpage');


CKEDITOR.replace($(item)[0], {
filebrowserBrowseUrl: browseUrl + '&type=files',
filebrowserImageBrowseUrl: browseUrl + '&type=images',
Expand All @@ -76,6 +81,7 @@
filebrowserImageUploadUrl: uploadUrl + '&type=images',
filebrowserFlashUploadUrl: uploadUrl + '&type=flash',
allowedContent: true, // For CiviMail!
fullPage: isFullPage,
customConfig: CRM.config.CKEditorCustomConfig,
on: {
instanceReady: onReady
Expand Down