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 all 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;
}
}
}
2 changes: 1 addition & 1 deletion app/services/html_scrubber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class HtmlScrubber < Rails::Html::PermitScrubber
BASIC_TAGS = 'p,br,strong,b,em,i,u,sub,sup,pre'.freeze
EXTRA_TAGS = ',a,div,span,code,ol,ul,li,h1,h2,h3,h4,table,thead,tbody,tfoot,tr,th,td'.freeze
STANDARD_TAGS = Set.new((BASIC_TAGS + EXTRA_TAGS).split(',')).freeze
TAG_ATTRS = Set.new(%w(href rel reversed start target title type)).freeze
TAG_ATTRS = Set.new(%w(href rel reversed start target title type style)).freeze

def initialize(attrs = [])
super()
Expand Down
13 changes: 10 additions & 3 deletions app/views/token_invitations/feedback_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<%= tinymce_assets %>

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

<%= render layout: 'container' do %>
<div class='message'>
<span class='bold'>You've successfully declined the invitation to
Expand Down Expand Up @@ -39,9 +45,10 @@
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',
elementpath: false,
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 @@ -9,11 +9,11 @@ const basicPlugins = 'code codesample paste autoresize';
const basicToolbar = 'bold italic underline | subscript superscript | undo redo ';

const anchorElement = ',a[href|rel|target|title]';
const listElement = ',ol[reversed|start|type]';
const listElement = ',ol[reversed|start|type|style]';

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