Sticky Toolbar in Froala Editor
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script>
<script src="https://editor-latest.s3.amazonaws.com/js/froala_editor.pkgd.min.js"></script>
<link rel="stylesheet" href="https://editor-latest.s3.amazonaws.com/css/froala_editor.pkgd.min.css">
<link rel="stylesheet" href="https://editor-latest.s3.amazonaws.com/css/froala_style.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div id="froala-editor">
<!DOCTYPE html>
<html>
<head>
<title></title>
<style class="custome_for_tieit">
.body-tr.selected_par>td,
.footer-tr.selected_par>td {
position: relative;
display: table-cell!important
}
td>div {
min-height: 0;
transition: .3s ease-in-out
}
.body-tr.selected_par>td:after,
.footer-tr.selected_par>td:after {
content: '';
position: absolute;
left: -2px;
right: -2px;
top: -2px;
bottom: -2px;
border: 3px solid #7C4DFF;
pointer-events: none;
z-index: 99;
}
.body-tr:first-child .par-put-up,
.body-tr:last-child .par-put-down {
display: none!important
}
td.fr-selected-cell>div.empty {
min-height: 15px;
cursor: default;
font-size: 12px;
}
td.fr-selected-cell>div.empty:after {
position: absolute;
content: '<-- spacer -->';
color: #ad4fbd;
left: 50%;
top: 50%;
transform: translate(-50%, -52%);
font-weight: 700;
font-size: 12px
}
.right_option_custome {
display: inline-block;
position: absolute;
right: 1px;
top: 1px;
z-index: 9999
}
.right_option_custome a {
width: 25px;
height: 25px;
background: #fff;
float: left;
cursor:...
JavaScript
$('div#froala-editor').froalaEditor({
inlineMode: false,
toolbarStickyOffset: 40,
fullPage: true,
htmlRemoveTags:[],
listAdvancedTypes: true,
htmlAllowedTags: ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'queue', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'style', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', 'title', 'meta', 'center'],
toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'lineHeight', 'color', 'formatBlock', 'inlineStyle', 'clearFormatting', "|", 'align', 'formatOL', 'formatUL', 'outdent', 'indent', "|", 'insertLink', 'insertImage', 'insertTable', 'insertButton', 'mergeTags', 'insertSocialMedia', "|", 'undo', 'redo', "|", 'html', 'fullscreen','previewPage', /*'selectTheme', 'previewPage'*/],
imageUploadParam: 'file',
// tableMultipleStyles:true,
tableEditButtons: ['tableHeader', 'tableRows', 'tableColumns', 'tableCells', '-','tableCellBackground', 'tableCellVerticalAlign', 'tableCellHorizontalAlign', '|', 'deleteContent',],
// imageEditButtons:...