Giter Site home page Giter Site logo

ckeditor-imgur's People

Contributors

carry0987 avatar dustball avatar yfxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ckeditor-imgur's Issues

bug with plugin on multi instances

Hi,
firts of all, thanks for imgur plugins. It works well except when working with multiple instances.

Here is the foloowing code :

`CKEDITOR.disableAutoInline = true;
$("div.body[contenteditable='true']").each(function( index ) {

			var element_id = $(this).attr('id');
			var comment_id = $(this).attr('data-comment-id');
			console.log(element_id);

			CKEDITOR.inline( element_id, {
				 customConfig: 'config-file-with-imgur.js',
			      on: {
			        blur: function( event ) {
			          var data = event.editor.getData();
			          alert('Sending: ' + data + ' to ' + comment_id );
			      }
				});
			});`

As result, the first item as inline editor but following are not and imgure problem trigger the following error - in web dev console :

TypeError: editor.window.getFrame(...) is null

thanks again !

Uncaught TypeError: Cannot read property '$' of null

An error appears on Chromes's console on this line:
a.on("instanceReady", function() { var b = $(a.window.getFrame().$).parent();

Uncaught TypeError: Cannot read property '$' of null

Despite of the error, the plugin seems working ok.

Fix documentation case problem

In documentation you have:

config.imgurClientId = ''

But the issue is that extension needs imgurClientID not imgurClientId (notice the case).
I wasted quite a lot of time, cos of this.

Please update the readme

Unable to set it up

Hi,

Looks like i am not able to set the imgurClientID working. I am always getting the alert telling me to add the key into the config file :
image

But it is there.
Also, i do not want my user to have all the tools in the toolbar so i created that array :
config.toolbar = [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-' ] }, { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, '/', { name: 'styles', items: [ 'Styles', 'FontSize' ] }, { name: 'colors', items: [ 'TextColor'] }, { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] }, // Here what should i have to add your plugin ? ];
Could you tell me what i could add inside it to add you plugin button into my toolbar?

Kind regards

Suggestion

You should had in the ReadMe file that we need to have Jquery loaded in the HEAD:

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script>

Regards ๐Ÿ˜„

Client ID case sensitive

Hey, thanks for this plugin, it was pretty much exactly what I needed. However, I found a little typo in the readme, it says config.imgurClientID but that should be config.imgurClientId (lower case D), as that's what the code refers to.

Can it auto change the response url's http to https?

Imgur support SSL, but you need to change the url by yourself, like this :
http://i.imgur.com/uwqAxXP.jpg

https://i.imgur.com/uwqAxXP.jpg

Can you let this plugin auto change http to https before get <img src="">?

Error Usage

https://github.com/yfxie/ckeditor-imgur#usage

CKEDITOR.editorConfig = function (config) {
    ...
    config.extraPlugins = 'imgur';
    // Get your client-id from https://api.imgur.com/oauth2/addclient
    config.imgurClientID = '55d8ba08326ec75';
    ...
};

In the code, replace imgurClientID to imgurClientId

Textarea disappear using imgur plugin.

Config.js:

`
CKEDITOR.editorConfig = function( config ) {

config.toolbarGroups = [
	{ name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
	{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
	{ name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
	{ name: 'forms' },
	{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
	{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
	{ name: 'links' },
	{ name: 'insert' },
	{ name: 'styles' },
	{ name: 'colors' },
	{ name: 'tools' },
	{ name: 'others' },
	{ name: 'about' }
];
config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';
config.removeDialogTabs = 'link:advanced';
config.extraPlugins = 'imgur';
    config.imgurClientId = '2e0148a912f8a30';

};
`

index.php textarea:

`

<textarea id="editor1" name="comment" ></textarea> <script> CKEDITOR.replace( 'editor1'); </script>

`

My Pluggins:

https://i.gyazo.com/775b4f94a20d7fd1c0e64c17f0c19084.png

Textarea disappear doing this...

Problem while uploading

Failed to load https://api.imgur.com/3/image: The 'Access-Control-Allow-Origin' header contains the invalid value ''. Origin 'domain' is therefore not allowed access.
VM557:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at Function.n.parseJSON (jquery-2.1.1.min.js:4)
at Object. (ckeditor.js:834)
at j (jquery-2.1.1.min.js:2)
at Object.fireWith [as rejectWith] (jquery-2.1.1.min.js:2)
at x (jquery-2.1.1.min.js:4)
at XMLHttpRequest. (jquery-2.1.1.min.js:4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.