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

Feature/aperta 11087 enable indentation and list styles in tinymce #3487

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/assets/stylesheets/components/_rich-text-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@
margin-left: 0px;
}
}

.mce-statusbar {
.mce-container-body {
height: 1.5rem;
}
}
}
17 changes: 14 additions & 3 deletions app/views/token_invitations/feedback_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<%= tinymce_assets %>

<style type="text/css">
.mce-statusbar .mce-container-body {
height: 1.5rem;
}

.mce-path {
Copy link

Choose a reason for hiding this comment

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

Is this needed? If this is hiding the element path in the status bar, the recommended way, and the way we do it in the component is to set elementpath=false in the config hash.

Copy link
Author

Choose a reason for hiding this comment

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

Oh yes it's responsible for hiding the element path, thanks for the pointer.

display: none;
}
</style>

<%= render layout: 'container' do %>
<div class='message'>
<span class='bold'>You've successfully declined the invitation to
Expand All @@ -10,6 +20,7 @@
<%= form_for @invitation, url: post_feedback_path(@invitation.token), method: 'post' do |f| %>
<%= f.label :decline_reason do %>
<div style='margin-bottom: 0.5em;'>
++++++++++
Please give your reasons for declining this invitation.
</div>
<% end %>
Expand Down Expand Up @@ -39,9 +50,9 @@
selector: 'textarea.tinymce',
branding: false,
menubar: false,
plugins: 'paste',
toolbar: 'bold italic underline | subscript superscript | undo redo',
valid_elements: 'p,br,strong/b,em/i,u,sub,sup,pre',
plugins: 'paste advlist lists',
toolbar: 'bold italic underline | subscript superscript | undo redo | indent outdent | bullist numlist',
valid_elements: 'p,br,strong/b,em/i,u,sub,sup,pre'
};

if (typeof window.tinyMCE !== 'undefined') {
Expand Down
6 changes: 3 additions & 3 deletions client/app/pods/components/rich-text-editor/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const anchorElement = ',a[href|rel|target|title]';
const listElement = ',ol[reversed|start|type]';

const expandedElements = ',div,span,code,ul,li,h1,h2,h3,h4,table,thead,tbody,tfoot,tr,th,td';
const expandedPlugins = ' link table';
const expandedToolbar = ' | bullist numlist | table link | formatselect';
const expandedPlugins = ' link table advlist lists ';
const expandedToolbar = ' indent outdent | bullist numlist | table link | formatselect';

const blockFormats = 'Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4';

Expand Down Expand Up @@ -56,7 +56,7 @@ export default Ember.Component.extend({
basic: {
plugins: basicPlugins,
toolbar: basicToolbar,
valid_elements: basicElements
valid_elements: basicElements,
},

expanded: {
Expand Down