on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
526 lines (525 loc) • 20.2 kB
JavaScript
/*! on-codemerge v1.3.1 @author Pavel Kuzmin @license MIT @homepage https://s00d.github.io/on-codemerge/ @repository git+https://github.com/s00d/on-codemerge.git Copyright (c) 2026 Pavel Kuzmin - Built on 2026-07-02T13:39:17.947Z */
const n = "Th1", t = "Th2", e = "Th3", i = "Th4", h = "Th5", o = "Th6", a = "Th7", c = "Th8", r = "Th9", l = "Th10", s = "Th11", g = "Th12", u = "Kiểu Chữ", d = "Đoạn Văn", p = "Trích Dẫn", m = "Định Dạng Sẵn", C = "Đã Cập Nhật", T = "Mới", b = "Mẫu", y = "Tên", S = "Nội Dung", D = "In Đậm", v = "Gạch Chân", L = "Gạch Ngang", k = "In Nghiêng", N = "Đáp Ứng", w = "Chuỗi", M = "Tổng", B = "Nhãn", E = "Giá Trị", H = "Màu Sắc", x = "Định Dạng", f = "X", A = "Y", V = "Kích Thước", I = "URL", P = "Liên Kết Neo", X = "Tiêu Đề", K = "Sao chép", F = "Lưu", R = "Xem", U = "Nhân Bản", z = "Hủy", G = "Chỉnh Sửa", Y = "Xóa", W = "Xóa", q = "Ngôn Ngữ", O = "Xuất", J = "Bạn có chắc không?", _ = "duyệt", j = "Đang tải lên", Q = "Từ", Z = "Ký Tự", $ = "Câu", nn = "Đoạn Văn", tn = "Hoàn Tác", en = "Làm Lại", hn = "Khôi Phục", on = "Chú Thích", an = "Chèn", cn = "phút", rn = "Chú giải", ln = "Áp dụng", sn = "Chủ đề", gn = "Kích thước", un = "Chiều rộng", dn = "Viền", pn = "Màu sắc", mn = "Hiệu ứng", Cn = "Điểm ngắt", Tn = "Căn chỉnh", bn = "Đệm", yn = "Chiều cao", Sn = "Chia", Dn = "Theo chiều ngang", vn = "Theo chiều dọc", Ln = "Hợp nhất", kn = "Di chuyển", Nn = "Lên", wn = "Xuống", Mn = "Cài đặt", Bn = "Cắt", En = "Dán", Hn = "Sắp xếp", xn = "Thuộc tính", fn = "Ô", An = "Di động", Vn = "Máy tính bảng", In = "Máy tính để bàn", Pn = "Lớn", Xn = "Siêu", Kn = "Linh hoạt", Fn = "Bộ đếm thời gian", Rn = "Chung", Un = "ngày", zn = "giờ", Gn = "giây", Yn = "Cho đến", Wn = "Tạo", qn = "Cập nhật", On = "Hành động", Jn = "Tăng dần", _n = "Người tham dự", jn = "Lịch", Qn = "Danh mục", Zn = "Xóa", $n = "Cộng tác", nt = "Dữ liệu", tt = "Giảm dần", et = "Mô tả", it = "Sự kiện", ht = "Cao", ot = "Nhập", at = "Vị trí", ct = "Thấp", rt = "Trung bình", lt = "Hướng", st = "Ưu tiên", gt = "Lựa chọn", ut = "Thẻ", dt = "Thời gian", pt = "Mẹo", mt = {
"New Block": "Khối Mới",
"Split Horizontally": "Chia Theo Chiều Ngang",
"Split Vertically": "Chia Theo Chiều Dọc",
"Move Up": "Di Chuyển Lên",
"Move Down": "Di Chuyển Xuống",
"Block 1": "Khối 1",
"Block 2": "Khối 2",
"Series 1": "Chuỗi 1",
"No valid data points to display": "Không có điểm dữ liệu hợp lệ để hiển thị",
Jan: n,
Feb: t,
Mar: e,
Apr: i,
May: h,
Jun: o,
Jul: a,
Aug: c,
Sep: r,
Oct: l,
Nov: s,
Dec: g,
"Keyboard Shortcuts": "Phím Tắt",
"Insert Table": "Chèn Bảng",
"Add Row Above": "Thêm Hàng Phía Trên",
"Add Row Below": "Thêm Hàng Phía Dưới",
"Add Column Left": "Thêm Cột Bên Trái",
"Add Column Right": "Thêm Cột Bên Phải",
"Delete Row": "Xóa Hàng",
"Delete Column": "Xóa Cột",
"Delete Table": "Xóa Bảng",
"Merge Cells": "Gộp Ô",
"Split Cell": "Tách Ô",
"Set Cell Border": "Đặt Viền Ô",
"Include header row": "Bao gồm hàng tiêu đề",
Typography: u,
"Typography Styles": "Kiểu Chữ",
"Clear Formatting": "Xóa Định Dạng",
"Heading 1": "Tiêu Đề 1",
"Heading 2": "Tiêu Đề 2",
"Heading 3": "Tiêu Đề 3",
"Heading 4": "Tiêu Đề 4",
Paragraph: d,
Blockquote: p,
Preformatted: m,
"Horizontal Line": "Đường Ngang",
Updated: C,
"Insert Video": "Chèn Video",
"Are you sure you want to delete this template?": "Bạn có chắc muốn xóa mẫu này không?",
New: T,
Templates: b,
Name: y,
Content: S,
"Insert YouTube Video": "Chèn Video YouTube",
"YouTube Video URL": "URL Video YouTube",
Bold: D,
Underline: v,
Strikethrough: L,
Italic: k,
"Responsive View": "Chế Độ Đáp Ứng",
"Mobile View": "Chế Độ Di Động",
"Tablet View": "Chế Độ Máy Tính Bảng",
"Desktop View": "Chế Độ Máy Tính",
"Large Desktop View": "Chế Độ Máy Tính Lớn",
"Ultra Wide View": "Chế Độ Siêu Rộng",
Responsive: N,
"Select a viewport size to preview your content at different screen widths.<br>Use the resize handles in responsive mode to adjust the width manually.": "Chọn kích thước viewport để xem trước nội dung của bạn ở các độ rộng màn hình khác nhau.<br>Sử dụng các núm điều chỉnh trong chế độ đáp ứng để điều chỉnh chiều rộng thủ công.",
Series: w,
Total: M,
"Data Points": "Điểm Dữ Liệu",
"Add Point": "Thêm Điểm",
Label: B,
Value: E,
Color: H,
Format: x,
"Delete Point": "Xóa Điểm",
"Series Data": "Dữ Liệu Chuỗi",
"Add Series": "Thêm Chuỗi",
"Series name": "Tên chuỗi",
"Insert Code Block": "Chèn Khối Mã",
"Copy to clipboard": "Sao chép vào bảng tạm",
"+ Add Data Point": "+ Thêm Điểm Dữ Liệu",
X: f,
Y: A,
"Bullet List": "Danh Sách Dấu Đầu Dòng",
"Numbered List": "Danh Sách Đánh Số",
Size: V,
URL: I,
Anchor: P,
Title: X,
'Open in new tab (target="_blank")': 'Mở trong tab mới (target="_blank")',
'Add rel="nofollow"': 'Thêm rel="nofollow"',
"Insert Chart": "Chèn Biểu Đồ",
"Enter your code here...": "Nhập mã của bạn ở đây...",
"Copied!": "Đã sao chép!",
Copy: K,
Save: F,
View: R,
Duplicate: U,
Cancel: z,
Edit: G,
Delete: Y,
Remove: W,
Language: q,
Export: O,
Error: "Lỗi",
"Insert Link": "Chèn Liên Kết",
"Align Left": "Căn Trái",
"Align Center": "Căn Giữa",
"Align Right": "Căn Phải",
"Insert Image": "Chèn Hình Ảnh",
"Font Size": "Cỡ Chữ",
"Font Family": "Phông Chữ",
"Font Settings": "Cài Đặt Phông Chữ",
"Upload File": "Tải Lên Tệp",
"Plain Text": "Văn Bản Thuần",
"Markdown File": "Tệp Markdown",
"HTML File": "Tệp HTML",
"Use comments to provide feedback or suggestions.": "Sử dụng bình luận để cung cấp phản hồi hoặc đề xuất.",
"Delete Comment": "Xóa Bình Luận",
"Please select some text to comment on": "Vui lòng chọn một số văn bản để bình luận",
"Failed to insert comment. Please try selecting a simpler text range.": "Không thể chèn bình luận. Vui lòng thử chọn một phạm vi văn bản đơn giản hơn.",
"Insert Comment": "Chèn Bình Luận",
"Recent Colors": "Màu Gần Đây",
Confirm: J,
"Background Color": "Màu Nền",
"Text Color": "Màu Văn Bản",
"Drag and drop your file here, or": "Kéo và thả tệp của bạn vào đây, hoặc",
browse: _,
"Maximum file size: ": "Kích thước tệp tối đa: ",
Uploading: j,
"File size exceeds 10MB limit": "Kích thước tệp vượt quá giới hạn {{max}}",
"Upload failed. Please try again.": "Tải lên thất bại. Vui lòng thử lại.",
Words: Q,
Characters: Z,
"Characters (without spaces)": "Ký Tự (không bao gồm khoảng trắng)",
Sentences: $,
Paragraphs: nn,
"HTML Source": "Mã Nguồn HTML",
"View HTML": "Xem HTML",
Undo: tn,
Redo: en,
Restore: hn,
"Initial version": "Phiên bản ban đầu",
"Changes from previous version:": "Thay đổi từ phiên bản trước:",
"Edit History": "Lịch Sử Chỉnh Sửa",
"View History": "Xem Lịch Sử",
"Reading time": "Thời gian đọc",
"Insert Footnote": "Chèn Chú Thích",
Footnotes: on,
"Add Footnote": "Thêm Chú Thích",
"Add explanatory or reference text that will appear at the bottom of the document": "Thêm văn bản giải thích hoặc tham khảo sẽ xuất hiện ở cuối tài liệu",
Insert: an,
min: cn,
"Export PNG": "Xuất PNG",
"Select template...": "Chọn mẫu...",
"Bar: Sales": "Cột: Doanh số",
"Pie: Expenses": "Tròn: Chi phí",
"Doughnut: Browsers": "Vòng: Trình duyệt",
"Line: Visitors": "Đường: Khách truy cập",
"Chart Title": "Tiêu đề biểu đồ",
"X Axis Label": "Nhãn trục X",
"Y Axis Label": "Nhãn trục Y",
Legend: rn,
"Show Legend": "Hiển thị chú thích",
"Hide Legend": "Ẩn chú thích",
"Table Properties": "Thuộc tính bảng",
Apply: ln,
"Style & Theme": "Kiểu dáng và chủ đề",
"Table Style": "Kiểu dáng bảng",
Theme: sn,
Dimensions: gn,
Width: un,
"Cell Padding": "Đệm ô",
Borders: dn,
"Border Style": "Kiểu viền",
"Border Width": "Độ rộng viền",
"Border Color": "Màu viền",
Colors: pn,
"Header Background": "Nền tiêu đề",
"Header Text Color": "Màu chữ tiêu đề",
Effects: mn,
"Zebra Stripe": "Sọc ngựa vằn",
"Hover Effect": "Hiệu ứng di chuột",
"Responsive Settings": "Cài đặt responsive",
Breakpoint: Cn,
"Enable Horizontal Scroll": "Bật cuộn ngang",
"Enable Touch Support": "Bật hỗ trợ cảm ứng",
"Enable Cards on Mobile": "Bật thẻ trên di động",
"Cell Formatting": "Định dạng ô",
"Text Formatting": "Định dạng văn bản",
"Font Weight": "Độ đậm font",
"Font Style": "Kiểu font",
"Text Decoration": "Trang trí văn bản",
Alignment: Tn,
"Horizontal Alignment": "Căn chỉnh ngang",
"Vertical Alignment": "Căn chỉnh dọc",
Padding: bn,
Height: yn,
"Insert Lazy Table": "Chèn bảng lazy",
"Edit Lazy Table": "Chỉnh sửa bảng lazy",
"Fill Table": "Điền bảng",
"Fill Table with Data": "Điền bảng với dữ liệu",
"Update Table": "Cập nhật bảng",
"Text Block": "Khối văn bản",
"Container Block": "Khối container",
"Split Container": "Chia container",
Split: Sn,
Horizontally: Dn,
Vertically: vn,
Merge: Ln,
Move: kn,
Up: Nn,
Down: wn,
Settings: Mn,
"Make Editable": "Cho phép chỉnh sửa",
"Make Read-only": "Chỉ đọc",
"Insert Block": "Chèn khối",
"Clear Cell": "Xóa ô",
"Delete Cell": "Xóa ô",
"Select All": "Chọn tất cả",
Cut: Bn,
Paste: En,
"Auto Size": "Tự động kích thước",
Sort: Hn,
"Sort Ascending": "Sắp xếp tăng dần",
"Sort Descending": "Sắp xếp giảm dần",
"Export Table": "Xuất bảng",
"Import Table": "Nhập bảng",
Properties: xn,
Cells: fn,
Mobile: An,
Tablet: Vn,
Desktop: In,
Large: Pn,
Ultra: Xn,
Fluid: Kn,
"Resize editor width": "Thay đổi chiều rộng trình soạn thảo",
Timer: Fn,
General: Rn,
days: Un,
hours: zn,
sec: Gn,
"Time expired": "Hết thời gian",
Until: Yn,
"Edit Timer": "Chỉnh sửa bộ đếm thời gian",
"Copy Timer": "Sao chép bộ đếm thời gian",
"Export Timer": "Xuất bộ đếm thời gian",
"Import Timer": "Nhập bộ đếm thời gian",
"Delete Timer": "Xóa bộ đếm thời gian",
"Timer copied successfully": "Sao chép bộ đếm thời gian thành công",
"Failed to copy timer": "Sao chép bộ đếm thời gian thất bại",
"Export failed": "Xuất thất bại",
"Timer imported successfully": "Nhập bộ đếm thời gian thành công",
"Import failed": "Nhập thất bại",
"Title is required": "Tiêu đề là bắt buộc",
"Target date is required": "Ngày mục tiêu là bắt buộc",
"Target time is required": "Thời gian mục tiêu là bắt buộc",
"Invalid date/time format": "Định dạng ngày/giờ không hợp lệ",
"Enter timer title": "Nhập tiêu đề bộ đếm thời gian",
"Enter timer description": "Nhập mô tả bộ đếm thời gian",
"Enter category": "Nhập danh mục",
"Enter tags separated by commas": "Nhập các thẻ được phân tách bằng dấu phẩy",
"New Timer": "Bộ đếm thời gian mới",
Create: Wn,
Update: qn,
"No timers found": "Không tìm thấy bộ đếm thời gian",
"Create your first timer to get started": "Tạo bộ đếm thời gian đầu tiên của bạn để bắt đầu",
"Are you sure you want to delete this timer?": "Bạn có chắc chắn muốn xóa bộ đếm thời gian này không?",
Actions: On,
"Add Column": "Thêm cột",
"Add Event": "Thêm sự kiện",
"Add Row": "Thêm hàng",
"All day event": "Sự kiện cả ngày",
"Are you sure you want to delete this calendar?": "Bạn có chắc chắn muốn xóa lịch này không?",
Ascending: Jn,
Attendees: _n,
"Auto Fit": "Tự động vừa",
"Bar/Area Mode": "Chế độ thanh/vùng",
"Block Style": "Kiểu khối",
"Block Style Editor": "Trình chỉnh sửa kiểu khối",
"CSS Classes": "Lớp CSS",
"CSS Selector (for HTML)": "Bộ chọn CSS (cho HTML)",
"CSV Delimiter": "Dấu phân cách CSV",
Calendar: jn,
"Calendar Title": "Tiêu đề lịch",
"Calendar copied successfully": "Sao chép lịch thành công",
"Calendar imported successfully": "Nhập lịch thành công",
Category: Qn,
"Cell Operations": "Thao tác ô",
"Chart Type": "Loại biểu đồ",
Clear: Zn,
"Clear Table": "Xóa bảng",
"Clipboard Operations": "Thao tác bộ nhớ tạm",
Collaboration: $n,
"Copy Calendar": "Sao chép lịch",
"Copy Cell": "Sao chép ô",
"Copy Event": "Sao chép sự kiện",
"Copy Table": "Sao chép bảng",
"Create your first calendar to get started": "Tạo lịch đầu tiên của bạn để bắt đầu",
"Current locale - Click to change": "Ngôn ngữ hiện tại - Nhấp để thay đổi",
"Current viewport - Click to change": "Viewport hiện tại - Nhấp để thay đổi",
"Cut Cell": "Cắt ô",
Data: nt,
"Data URL": "URL dữ liệu",
Date: "Ngày",
"Default Colors": "Màu mặc định",
"Delete Calendar": "Xóa lịch",
"Delete Elements": "Xóa phần tử",
"Delete Event": "Xóa sự kiện",
Descending: tt,
Description: et,
"Display Settings": "Cài đặt hiển thị",
"Duplicated Block": "Khối đã sao chép",
"Duration (minutes)": "Thời lượng (phút)",
"Edit Calendar": "Chỉnh sửa lịch",
"Edit Event": "Chỉnh sửa sự kiện",
"Enter X axis label...": "Nhập nhãn trục X...",
"Enter Y axis label...": "Nhập nhãn trục Y...",
"Enter attendees (comma separated)": "Nhập người tham dự (phân cách bằng dấu phẩy)",
"Enter calendar description": "Nhập mô tả lịch",
"Enter calendar title": "Nhập tiêu đề lịch",
"Enter chart title...": "Nhập tiêu đề biểu đồ...",
"Enter event description": "Nhập mô tả sự kiện",
"Enter event location": "Nhập địa điểm sự kiện",
"Enter event title": "Nhập tiêu đề sự kiện",
"Enter tags (comma separated)": "Nhập thẻ (phân cách bằng dấu phẩy)",
Event: it,
"Event copied successfully": "Sao chép sự kiện thành công",
"Export Calendar": "Xuất lịch",
"Export as PNG": "Xuất dưới dạng PNG",
"Failed to copy calendar": "Sao chép lịch thất bại",
"Failed to copy event": "Sao chép sự kiện thất bại",
"First row contains headers": "Hàng đầu tiên chứa tiêu đề",
"Fluid width": "Chiều rộng linh hoạt",
"Format Cell": "Định dạng ô",
High: ht,
Import: ot,
"Import Calendar": "Nhập lịch",
"Import Type": "Loại nhập",
"Import/Export": "Nhập/Xuất",
"Inline Styles": "Kiểu nội tuyến",
"Insert Cell": "Chèn ô",
"Insert Cell Above": "Chèn ô phía trên",
"Insert Cell Below": "Chèn ô phía dưới",
"Insert Cell Left": "Chèn ô bên trái",
"Insert Cell Right": "Chèn ô bên phải",
"Insert Math": "Chèn toán học",
"Language Settings": "Cài đặt ngôn ngữ",
"Large Desktop": "Màn hình lớn",
"Large desktop view": "Chế độ xem màn hình lớn",
"Line Height": "Chiều cao dòng",
Location: at,
Low: ct,
Medium: rt,
"Merge Horizontally": "Hợp nhất theo chiều ngang",
"Merge Vertically": "Hợp nhất theo chiều dọc",
"New Calendar": "Lịch mới",
"New Template": "Mẫu mới",
"No calendars found": "Không tìm thấy lịch",
"No reminder": "Không có nhắc nhở",
"Note: Width is disabled when Horizontal Scroll is enabled": "Lưu ý: Chiều rộng bị vô hiệu hóa khi bật cuộn ngang",
Orientation: lt,
"Paste Cell": "Dán ô",
"Please enter a valid URL": "Vui lòng nhập URL hợp lệ",
"Print / PDF File": "In / Tệp PDF",
Priority: st,
"Reminder (minutes before)": "Nhắc nhở (phút trước)",
"Resize Columns": "Thay đổi kích thước cột",
"Search shortcuts...": "Tìm kiếm phím tắt...",
"Select Column": "Chọn cột",
"Select Elements": "Chọn phần tử",
"Select Row": "Chọn hàng",
"Select Viewport": "Chọn viewport",
"Select category": "Chọn danh mục",
Selection: gt,
"Show Grid": "Hiển thị lưới",
"Smartphone view": "Chế độ xem điện thoại thông minh",
"Sort Table": "Sắp xếp bảng",
"Spell Check": "Kiểm tra chính tả",
"Standard desktop": "Màn hình tiêu chuẩn",
"Table ID (optional)": "ID bảng (tùy chọn)",
"Table Management": "Quản lý bảng",
"Table Operations": "Thao tác bảng",
"Table Tools": "Công cụ bảng",
"Tablet view": "Chế độ xem máy tính bảng",
Tags: ut,
"Tags (comma separated)": "Thẻ (phân cách bằng dấu phẩy)",
"Target Date": "Ngày mục tiêu",
"Target Time": "Thời gian mục tiêu",
Time: dt,
Tips: pt,
"Ultra Wide": "Siêu rộng",
"Ultra wide screen": "Màn hình siêu rộng",
"• Responsive mode allows manual resizing": "• Chế độ đáp ứng cho phép thay đổi kích thước thủ công",
"• Tables adapt automatically to viewport size": "• Bảng tự động thích ứng với kích thước viewport",
"• Use hotkeys for quick switching": "• Sử dụng phím tắt để chuyển đổi nhanh",
"• Viewport state is saved automatically": "• Trạng thái viewport được lưu tự động"
};
export {
On as Actions,
Tn as Alignment,
P as Anchor,
ln as Apply,
i as Apr,
Jn as Ascending,
_n as Attendees,
c as Aug,
p as Blockquote,
D as Bold,
dn as Borders,
Cn as Breakpoint,
jn as Calendar,
z as Cancel,
Qn as Category,
fn as Cells,
Z as Characters,
Zn as Clear,
$n as Collaboration,
H as Color,
pn as Colors,
J as Confirm,
S as Content,
K as Copy,
Wn as Create,
Bn as Cut,
nt as Data,
g as Dec,
Y as Delete,
tt as Descending,
et as Description,
In as Desktop,
gn as Dimensions,
wn as Down,
U as Duplicate,
G as Edit,
mn as Effects,
it as Event,
O as Export,
t as Feb,
Kn as Fluid,
on as Footnotes,
x as Format,
Rn as General,
yn as Height,
ht as High,
Dn as Horizontally,
ot as Import,
an as Insert,
k as Italic,
n as Jan,
a as Jul,
o as Jun,
B as Label,
q as Language,
Pn as Large,
rn as Legend,
at as Location,
ct as Low,
e as Mar,
h as May,
rt as Medium,
Ln as Merge,
An as Mobile,
kn as Move,
y as Name,
T as New,
s as Nov,
l as Oct,
lt as Orientation,
bn as Padding,
d as Paragraph,
nn as Paragraphs,
En as Paste,
m as Preformatted,
st as Priority,
xn as Properties,
en as Redo,
W as Remove,
N as Responsive,
hn as Restore,
F as Save,
gt as Selection,
$ as Sentences,
r as Sep,
w as Series,
Mn as Settings,
V as Size,
Hn as Sort,
Sn as Split,
L as Strikethrough,
Vn as Tablet,
ut as Tags,
b as Templates,
sn as Theme,
dt as Time,
Fn as Timer,
pt as Tips,
X as Title,
M as Total,
u as Typography,
I as URL,
Xn as Ultra,
v as Underline,
tn as Undo,
Yn as Until,
Nn as Up,
qn as Update,
C as Updated,
j as Uploading,
E as Value,
vn as Vertically,
R as View,
un as Width,
Q as Words,
f as X,
A as Y,
_ as browse,
Un as days,
mt as default,
zn as hours,
cn as min,
Gn as sec
};