redactor.js

Can I customise the header tags(h1,h2,h3…) in redactor editor?

拜拜、爱过 提交于 2020-01-13 17:11:39
问题 I've used the plugins of redactor editor to change the font size and font color of text. It's working fine in other tags except the header. Don't understand why.. I've tried this $('#redactor').redactor({ focus: true, plugins: ['fontcolor', 'fontsize'], formatting: ['p', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], }); Any help? 回答1: You can format the text by adding CSS! By adding classes to the elements, you could style them like you want to See the documentation or the example below

Can I customise the header tags(h1,h2,h3…) in redactor editor?

爷,独闯天下 提交于 2020-01-13 17:11:27
问题 I've used the plugins of redactor editor to change the font size and font color of text. It's working fine in other tags except the header. Don't understand why.. I've tried this $('#redactor').redactor({ focus: true, plugins: ['fontcolor', 'fontsize'], formatting: ['p', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], }); Any help? 回答1: You can format the text by adding CSS! By adding classes to the elements, you could style them like you want to See the documentation or the example below

Yii 1.x imperavi redactor execCommand('strikethrough') not working

一笑奈何 提交于 2020-01-07 06:54:05
问题 After Chrome 58 update few features like Bold, Italic & Underline stopped working. On debugging i found that execCommand('strikethrough') is not striking the selected text. formatMultiple: function(tag) { this.inline.formatConvert(tag); this.selection.save(); document.execCommand('strikethrough'); //HERE, IT IS NOT STRIKING THE TEXT this.$editor.find('strike').each($.proxy(function(i,s) { var $el = $(s); this.inline.formatRemoveSameChildren($el, tag); var $span; if (this.inline.type) { $span

Redactor editor text format issues with Chrome version 58

寵の児 提交于 2019-12-20 17:41:36
问题 We're using Redactor(https://imperavi.com/redactor/) version 10.1.1 and not migrated to Redactor II due to lot of dependencies on project. Recently We're facing a very weird issue with Chrome version 58. Issues are: -- Not able to format bold, italic, underline, sup, sub etc. for selected text Kindly let us know is there any fix for this. Any kind of help would be greatly appreciated. Update as per accepted work around solution: // Provided solution is tested for Redactor version 10.1.1

Redactor editor text format issues with Chrome version 58

江枫思渺然 提交于 2019-12-20 17:41:17
问题 We're using Redactor(https://imperavi.com/redactor/) version 10.1.1 and not migrated to Redactor II due to lot of dependencies on project. Recently We're facing a very weird issue with Chrome version 58. Issues are: -- Not able to format bold, italic, underline, sup, sub etc. for selected text Kindly let us know is there any fix for this. Any kind of help would be greatly appreciated. Update as per accepted work around solution: // Provided solution is tested for Redactor version 10.1.1

Redactor editor - How to set cursor at the end on focus

烈酒焚心 提交于 2019-12-11 13:58:42
问题 I'm working on a project that uses redactor as an editor. So every time I set focus using jQuery it's cursor goes on start. I see an option focusEnd on it's documentations but it does not work maybe because I'm using rtl direction. Any idea? 回答1: You can use below code to set cursor at the end: this.focus.setEnd(); 来源: https://stackoverflow.com/questions/28982416/redactor-editor-how-to-set-cursor-at-the-end-on-focus

Can I customise the header tags(h1,h2,h3…) in redactor editor?

折月煮酒 提交于 2019-12-06 00:34:03
I've used the plugins of redactor editor to change the font size and font color of text. It's working fine in other tags except the header. Don't understand why.. I've tried this $('#redactor').redactor({ focus: true, plugins: ['fontcolor', 'fontsize'], formatting: ['p', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], }); Any help? You can format the text by adding CSS! By adding classes to the elements, you could style them like you want to See the documentation or the example below for more information! HTML: <textarea id="redactor" name="content">...</textarea> JS: <script type="text