Portal UI

CKEditor

Richtext editor using CKEditor 4 Open Source Version

<x-portal::editor.ckeditor 
    placeholder="Description ..." 
    name="description"
    height="150"
    uploadUrl="portal.ui/storage/upload"
>
        Default Value
</x-portal::editor.ckeditor>

Publishing Component

If you want to customize the components, you can publish them by running the following command :

php artisan vendor:publish --tag=portal-ui:editor --force


Upload Images

The component uses the uploadUrl attribute as the URL where the toolbar image will be uploaded.
The default upload URL is $APP_URL/ckeditor/upload .
You must manually register this URL and handle the upload process in your own way.
The response from your handler must be a JSON object as follows:

{
    "uploaded": true,
    "fileName": "filename.jpg",
    "url": "http://localhost/path/filename.jpg"
}


Remove Toolbar

<x-portal::editor.ckeditor 
    placeholder="Description ..." 
    remove="Source,Save,NewPage,ExportPdf"
    name="ckeditor_2"
    height="150"
>
        Default Value
</x-portal::editor.ckeditor>


All Available Toolbar

Source,
Save,
NewPage,
ExportPdf,
Preview,
Print,
Templates,
Cut,
Copy,
Paste,
PasteText,
PasteFromWord,
Undo,
Replace,
Find,
Redo,
SelectAll,
Scayt,
Form,
Checkbox,
TextField,
Textarea,
Radio,
Select,
Button,
ImageButton,
HiddenField,
Bold,
Italic,
Underline,
Strike,
Superscript,
Subscript,
CopyFormatting,
RemoveFormat,
NumberedList,
BulletedList,
Outdent,
Indent,
Blockquote,
CreateDiv,
JustifyLeft,
JustifyCenter,
JustifyRight,
JustifyBlock,
BidiLtr,
BidiRtl,
Language,
Link,
Unlink,
Anchor,
Image,
Table,
HorizontalRule,
Smiley,
SpecialChar,
PageBreak,
Iframe,
Format,
Styles,
FontSize,
TextColor,
BGColor,
Maximize,
ShowBlocks,
About