It possible block image tag in eltre editor???

Added by Artur Olszewski 11 months ago

Hello.I remove image button from eltre UI panel-but whene drag a drop image to eltre text area, images are show.
I wont image in textarea,so is any way to block images in editor???
Thx for answer.


Replies (3)

RE: It possible block image tag in eltre editor??? - Added by Dmitry Levashov 11 months ago

add tag in options denyTags

for example before create elRTE instance

elRTE.prototype.options.denyTags.push('img');

RE: It possible block image tag in eltre editor??? - Added by Artur Olszewski 11 months ago

THX for answer.
Now it working that:
When i drop and down images to text area in eltre editor-image is showing.
When i click in source code bookmark image tag is added but when i back to editor bookmark-image is removed.
I think is not quite well work.How removed image imaditiely when drag and drop??

RE: It possible block image tag in eltre editor??? - Added by Artur Olszewski 10 months ago

[[$jq().ready(function () {
          * elRTE.prototype.options.denyTags.push('img');*
           elRTE.prototype.options.pasteOnlyText = true;
           elRTE.prototype.options.absoluteURLs = false;
           elRTE.prototype.options.panels.web2pyPanel = [
     'fontname', 'fontsize', 'formatblock', 'bold', 'italic', 'underline', 'forecolor', ' hilitecolor', 'justifyleft', 'justifyright',
     'justifycenter', 'justifyfull', 'outdent', 'indent', 'insertorderedlist', 'insertunorderedlist', 'cut', 'paste', 'pastetext', 'pasteformattext', 'blockquote', 'smiley', 'horizontalrule', 'fullscreen', 'undo', 'redo'

  ];

           elRTE.prototype.options.toolbars.web2pyToolbar = ['web2pyPanel'];

           var opts = {
               lang: 'pl',   // set your language
               styleWithCSS: false,
               height: 100,
               toolbar: 'web2pyToolbar'
           };
           // create editor
           $jq('#Edytor').elrte(opts);});]]
           $jq().ready(function () {
           elRTE.prototype.options.denyTags.push('img');
           elRTE.prototype.options.pasteOnlyText = true;
           elRTE.prototype.options.absoluteURLs = false;
           elRTE.prototype.options.panels.web2pyPanel = [
     'fontname', 'fontsize', 'formatblock', 'bold', 'italic', 'underline', 'forecolor', ' hilitecolor', 'justifyleft', 'justifyright',
     'justifycenter', 'justifyfull', 'outdent', 'indent', 'insertorderedlist', 'insertunorderedlist', 'cut', 'paste', 'pastetext', 'pasteformattext', 'blockquote', 'smiley', 'horizontalrule', 'fullscreen', 'undo', 'redo'

  ];
      elRTE.prototype.options.toolbars.web2pyToolbar = ['web2pyPanel'];

           var opts = {
               lang: 'pl',   // set your language
               styleWithCSS: false,
               height: 100,
               toolbar: 'web2pyToolbar'
           };
           // create editor
           $jq('#Edytor').elrte(opts);

When i submit form i get img obiect in textarea value,so denyTags still didnt work,so how may i did it correctly??
And i having second question,eltre having any options to limit size in textarea??

(1-3/3)