ckeditor5

How can I set height in CKEditor 5 with Ionic?

大城市里の小女人 提交于 2019-12-01 14:32:17
I want to create a text editor using Ionic and Angular. I applied it using CKEditor 5 but the height value is not changed. According to the CKEditor 5 documentation, I can control the height value through the config attribute. I have confirmed through the config option that 'paragraphs' are translated into Korean. Is my approach wrong? Here is my source code. My source code consists of 'html', 'component.module.ts', 'component.ts'. html template <ckeditor formControlName="bbsContent" [editor]="Editor" [config]="config" style="height: 300px" data=""></ckeditor> component.module.ts import {

How can I set height in CKEditor 5 with Ionic?

Deadly 提交于 2019-12-01 12:21:56
问题 I want to create a text editor using Ionic and Angular. I applied it using CKEditor 5 but the height value is not changed. According to the CKEditor 5 documentation, I can control the height value through the config attribute. I have confirmed through the config option that 'paragraphs' are translated into Korean. Is my approach wrong? Here is my source code. My source code consists of 'html', 'component.module.ts', 'component.ts'. html template <ckeditor formControlName="bbsContent" [editor]

How to get value of CKEditor 5?

我与影子孤独终老i 提交于 2019-12-01 05:19:00
I want to be able to return the value of the CKEditor textarea, and also write my text inside it. I used CKEditor 5 CDN. First this my code for the textarea it works fine <script src="https://cdn.ckeditor.com/ckeditor5/1.0.0-alpha.1/classic/ckeditor.js"></script> <textarea class="inputStyle" id="editor" name="content" placeholder="Write your email.."></textarea> <script>ClassicEditor.create(document.querySelector('#editor')).catch( error => { console.error( error ); } ); </script> I used to get the data from the textarea before the CKEditor by: var text = $('textarea#editor').val(); and set

How to get value of CKEditor 5?

末鹿安然 提交于 2019-12-01 01:59:15
问题 I want to be able to return the value of the CKEditor textarea, and also write my text inside it. I used CKEditor 5 CDN. First this my code for the textarea it works fine <script src="https://cdn.ckeditor.com/ckeditor5/1.0.0-alpha.1/classic/ckeditor.js"></script> <textarea class="inputStyle" id="editor" name="content" placeholder="Write your email.."></textarea> <script>ClassicEditor.create(document.querySelector('#editor')).catch( error => { console.error( error ); } ); </script> I used to

How to do CKEditor 5 Image Uploading?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 02:30:20
ClassicEditor .create( editorElement, { ckfinder: { uploadUrl: 'my_server_url' } } ) .then( ... ) .catch( ... ); What should be my server response? I am using Java in the backend. Whatever my response is, it throws a dialog box 'cannot upload file'. Ganesh prajapati Success response : { "uploaded": true, "url": "http://127.0.0.1/uploaded-image.jpeg" } Failure response : { "uploaded": false, "error": { "message": "could not upload this image" } } this is my code for Ckeditor 5 and Phalcon framework.#products_desc point to textarea id. <script> var myEditor; ClassicEditor .create( document

How to do CKEditor 5 Image Uploading?

主宰稳场 提交于 2019-11-28 21:40:52
问题 ClassicEditor .create( editorElement, { ckfinder: { uploadUrl: 'my_server_url' } } ) .then( ... ) .catch( ... ); What should be my server response? I am using Java in the backend. Whatever my response is, it throws a dialog box 'cannot upload file'. 回答1: Success response : { "uploaded": true, "url": "http://127.0.0.1/uploaded-image.jpeg" } Failure response : { "uploaded": false, "error": { "message": "could not upload this image" } } 回答2: this is my code for Ckeditor 5 and Phalcon framework.

CKEditor 5 – get editor instances

青春壹個敷衍的年華 提交于 2019-11-28 12:55:05
I am migrating from CKEditor 4.7 to 5. In CKE4, I would do something like this: CKEDITOR.replace('text_area'); and then in another JS function I could get the data by CKEDITOR.instances.text_area.getData() . But it doesn't appear that CKE5 has a function ClassicEditor.instances or something analogous. I know I can store the editor instance as a global JS variable, but the code I am working with creates the editors in a general function, so I can't just create a global variable since I don't know the name of the editor a priori. There can also be several editors active on the screen at the same

How to get data from CKEditor 5 instance

依然范特西╮ 提交于 2019-11-28 12:21:31
I know that for CKEditor 4, you can get the textarea data like this: var content = CKEDITOR.instances['comment'].getData(); How is this done for CKEditor 5? You can find the answer in the Basic API guide. Basically, in CKEditor 5 there's no single global editors repository (like the old CKEDITOR.instances global variable). This means that you need to keep the reference to the editor that you created and use that reference once you'll want to retrieve the data: ClassicEditor .create( document.querySelector( '#editor' ) ) .then( editor => { editor.getData(); // -> '<p>Foo!</p>' } ) .catch( error

How to programatically insert link at current position in CKEditor 5

匆匆过客 提交于 2019-11-28 04:51:37
问题 In my app, I have a specific dialog to create internal links. After user finishes filling the dialog I want to programatically insert generated link to current caret position in the editor. So far I've been using SummerNote and there it is easy: editor.summernote('createLink', { text: linkTitle, url: url }); In CKEditor 5 I found this method which seems like it could do what I need: doc.enqueueChanges(() => { editor.data.insertContent(content, doc.selection); }); My problem is that I don't

How to set the height of CKEditor 5 (Classic Editor)

元气小坏坏 提交于 2019-11-27 23:27:43
In CKEditor 4 to change the editor height there was a configuration option: config.height . How do I change the height of CKEditor 5? (the Classic Editor) Wiktor Walc Answering my own question as it might help others. CKEditor 5 no longer comes with a configuration setting to change its height. The height can be easily controlled with CSS. There is one tricky thing though, if you use the Classic Editor : <div id="editor1"></div> ClassicEditor .create( document.querySelector( '#editor1' ) ) .then( editor => { // console.log( editor ); } ) .catch( error => { console.error( error ); } ); Then the