mesdan
Version:
Latinî mesdan ile Osmanî metin yazmak için hazırlanmış bir alettir.
42 lines (41 loc) • 2.35 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
import { OsmaniMesdanEki } from './ek--osmani-mesdan';
import { SağdanSolaEki } from './ek--sagdan-sola';
const theme = {};
const initialConfig = {
namespace: 'OsmaniMesdanEki',
theme,
onError(hata) {
console.error('Lexical hatâsı:', hata);
},
};
export const LexicalMetinger = () => {
return (_jsx("div", { dir: "rtl", className: "amiri-regular", style: { textAlign: 'right' }, children: _jsx(LexicalComposer, { initialConfig: initialConfig, children: _jsxs("div", { style: {
position: 'relative',
border: '1px solid #ccc',
padding: '10px',
borderRadius: '8px',
background: '#fff',
}, children: [_jsx(PlainTextPlugin, { contentEditable: _jsx(ContentEditable, { dir: "rtl", style: {
outline: 'none',
minHeight: '150px',
textAlign: 'right',
direction: 'rtl',
unicodeBidi: 'plaintext',
fontFamily: '"Scheherazade New", "Amiri", serif',
fontSize: '20px',
lineHeight: 1.6,
} }), placeholder: _jsx("div", { style: {
position: 'absolute',
top: 10,
right: 12,
color: '#aaa',
pointerEvents: 'none',
fontFamily: '"Scheherazade New", "Amiri", serif',
}, children: "\u0627\u0644\u0641\u0628\u0627 \u0627\u064A\u0644\u0647\u200C \u064A\u0627\u0632..." }), ErrorBoundary: LexicalErrorBoundary }), _jsx(HistoryPlugin, {}), _jsx(SağdanSolaEki, {}), _jsx(OsmaniMesdanEki, {})] }) }) }));
};