redactor

AngularJS & Redactor Plugin

被刻印的时光 ゝ 提交于 2020-02-12 16:51:32
问题 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

AngularJS & Redactor Plugin

…衆ロ難τιáo~ 提交于 2020-02-12 16:49:27
问题 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

AngularJS & Redactor Plugin

大兔子大兔子 提交于 2020-02-12 16:49:19
问题 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

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

Textarea editor Redactor. Insert value with jQuery

我是研究僧i 提交于 2019-12-23 08:15:19
问题 Have field textarea id="tr" using HTML editor Redactor last version trying to set value of the field exactly haw it is described in API Doc : $('#tr').redactor('insertText', 'text'); or $('#tr').redactor('insertHtml', 'text'); What am I doing wrong ? 回答1: Try the set API, which I think is a lower-level version of insertText / insertHtml . So in your example, it should be: $('#tr').redactor('set', 'Your text goes here'); Update : In redactor version 10 (and greater), the name of the set method

Textarea editor Redactor. Insert value with jQuery

六眼飞鱼酱① 提交于 2019-12-23 08:13:41
问题 Have field textarea id="tr" using HTML editor Redactor last version trying to set value of the field exactly haw it is described in API Doc : $('#tr').redactor('insertText', 'text'); or $('#tr').redactor('insertHtml', 'text'); What am I doing wrong ? 回答1: Try the set API, which I think is a lower-level version of insertText / insertHtml . So in your example, it should be: $('#tr').redactor('set', 'Your text goes here'); Update : In redactor version 10 (and greater), the name of the set method

Codeigniter + Redactor (wysiwyg js editor). Image uploading

☆樱花仙子☆ 提交于 2019-12-12 04:35:13
问题 I trying to integrate wysiwyg editor Redactor in Codeigniter website. RedactorOptions: { lang: lang(), toolbarFixed: true, buttons: ['html', '|', 'bold', 'italic', 'deleted', '|', 'image', 'video', '|', 'unorderedlist', 'orderedlist', '|', 'alignment', '|', 'horizontalrule', '|', 'table', '|', 'mtLink'], imageUpload: '/upload_photo' } while I start to send photo through Upload Image Dialog, I see in Developer console: Uncaught TypeError: Cannot read property '0' of null redactor.js:1 Redactor

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

Remove empty tags in Imperavi Redactor

血红的双手。 提交于 2019-12-11 07:39:34
问题 Using Imperavi Redactor with Yii 2 framework. When no text is entered, Imperavi Redactor produces this markup: <p><br></p> . For each line break this markup is appended too. I want to remove this because there is no way to normally validate such content with RequiredValidator . I want to do deletion in beforeValidate() event and check if any text is entered. If there is no text except empty tags, spaces and line breaks the saving is not allowed. Otherwise the content should be saved in