redactor

Imperavi Redactor content not being copied over to hidden textarea

空扰寡人 提交于 2019-12-11 00:22:11
问题 I'm trying to use the Imperavi Redactor control for my rich text editing here: <div class="control-group"> <%= f.label :description %> <div class="controls"> <%= f.text_area :description, :class => "richtext" %> </div> </div> $(document).ready(function(){ $('.richtext').redactor(); }); The rich text editor appears and works fine, however when I type in content, I can see using the Inspect Element in Google Chrome that the html markup is not being copied over to the hidden text area. See: <div

Redactor editor change image tag when upload

你说的曾经没有我的故事 提交于 2019-12-10 09:26:08
问题 When Uploading a image through Redactor Redactor will generate <img src="blablabla.png"/> tag What if I want the tag is like: <img class="myClass" src="blablabla.png"/> How to do this? I have viewed all the API and Callback but I didn't find any method to implement this. 回答1: It looks like you can use the imageUploadCallback. This callback is triggered on successful image upload and the image DOM element is there for you to manipulate. $('#redactor').redactor({ imageUploadCallback: function

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

Redactor editor change image tag when upload

假如想象 提交于 2019-12-05 13:18:36
When Uploading a image through Redactor Redactor will generate <img src="blablabla.png"/> tag What if I want the tag is like: <img class="myClass" src="blablabla.png"/> How to do this? I have viewed all the API and Callback but I didn't find any method to implement this. It looks like you can use the imageUploadCallback . This callback is triggered on successful image upload and the image DOM element is there for you to manipulate. $('#redactor').redactor({ imageUploadCallback: function(image, json) { // image = this is DOM element of image // json = for example: { "filelink": "/images/img.jpg

How can I integrate spell-checking to redactor?

微笑、不失礼 提交于 2019-12-03 17:03:12
问题 How can I add spell checking to the jQuery Redactor editor? I have found a few spell checking JavaScript plugins, but none are easily integrated into Redactor. Has anyone managed to do this successfully? Using .NET, and need our own custom dictionary. None of these spell checkers I've found can be easily integrated: JavaScript SpellCheck WebSpellChecker (expensive) JQuery Spell Checker (uses Google spell check, no custom dictionary with .NET) 回答1: I'm the author of the jQuery SpellChecker you

How can I integrate spell-checking to redactor?

旧巷老猫 提交于 2019-12-03 06:05:03
How can I add spell checking to the jQuery Redactor editor? I have found a few spell checking JavaScript plugins, but none are easily integrated into Redactor. Has anyone managed to do this successfully? Using .NET, and need our own custom dictionary. None of these spell checkers I've found can be easily integrated: JavaScript SpellCheck WebSpellChecker (expensive) JQuery Spell Checker (uses Google spell check, no custom dictionary with .NET) badsyntax I'm the author of the jQuery SpellChecker you linked to. I have re-written the plugin and created a demo page showing how you can integrate it

redactor.js pastePlainText - but need button to paste html instead

半世苍凉 提交于 2019-12-01 10:41:09
问题 Most of our customers complain about formatting carried across from Word to our redactor.js rich text editor fields. We upgraded to use the pastePlainText setting, which seems to work well. However SOME customers still need to paste html into the rich text boxes. We've added a "paste as html" button to the toolbar using a plugin but we can't work out what code to add to the plugin to paste the clipboard content as-is into the editor. Help! We'd be almost as happy to remove the pastePlainText

How to bind posted data named “file[]” to an MVC model?

吃可爱长大的小学妹 提交于 2019-12-01 04:18:29
I am using Redactor as an HTML editor, which has a component for uploading images and files . Redactor takes care of the client side bit, and I need to provide the server side upload functionality. I have no problem getting the uploads to work if I use Request.Files in the controller. But I would like to bind the posted files to a Model, and I seem unable to do this, because the parameter they are sent with is files[] - with square brackets in the name. My question: Is it possible to bind the posted "file[]" to an MVC model? It's an invalid property name, and using file alone doesn't work.

How to bind posted data named “file[]” to an MVC model?

让人想犯罪 __ 提交于 2019-12-01 02:04:54
问题 I am using Redactor as an HTML editor, which has a component for uploading images and files. Redactor takes care of the client side bit, and I need to provide the server side upload functionality. I have no problem getting the uploads to work if I use Request.Files in the controller. But I would like to bind the posted files to a Model, and I seem unable to do this, because the parameter they are sent with is files[] - with square brackets in the name. My question: Is it possible to bind the

AngularJS & Redactor Plugin

僤鯓⒐⒋嵵緔 提交于 2019-11-30 07:43:47
So I am working on a new site in AngularJS, and loving it! I have encountered a problem, however. I am trying to add a jQuery plugin called 'Redactor' to my textareas, but I think what is happening is when I initialise the plugin, it replaces the textarea element. The reason this is problematic, is because I have set an 'ng-model' attribute to the text area, like so: I am using AngularJS UI to pickup the focus event, and then execute the following code upon focus of the text $scope.addRedactor = function() { $('.redactor').redactor(); }); Now I can't seem to get the value of the textarea,