Reputation: 1
[code snippet][1][enter image description here][2]This is the problem I am facing
I am facing one problem in my project where I used Tinymce's RTE, but when I write anything on it, it displays the text backwards on RTE, Is there any problem in default system that it write text from right to left instead of left to right?
import React from 'react'
import { Controller } from 'react-hook-form'
import {Editor} from '@tinymce/tinymce-react'
export default function RTE({name, control,label, defaultValue = ""}) {
return (
<div className='w-full'>
{label && <label className='inline-block mb-1 pl-1 '>{label}</label>}
<Controller
name = {name || "content"}
control = {control}
render ={({field : {onChange}})=>{
return <Editor
apiKey='ba5uegymspq869k9ppqqmy7iyrv0x343usoozmiybsy4folu'
initialValue={defaultValue}
init={{
initialValue: defaultValue,
height: 500,
menubar: true,
plugins: [
"image",
"advlist",
"autolink",
"lists",
"link",
"image",
"charmap",
"preview",
"anchor",
"searchreplace",
"visualblocks",
"code",
"fullscreen",
"insertdatetime",
"media",
"table",
"code",
"help",
"wordcount",
"anchor",
],
toolbar:
"undo redo | blocks | image | bold italic forecolor | alignleft aligncenter bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent |removeformat | help",
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
}}
onEditorChange={onChange}
/>
}}
/>
</div>
)
}
[1]: https://i.sstatic.net/UfJF2ZED.png
[2]: https://i.sstatic.net/gYLGGtmI.png
Upvotes: 0
Views: 67