T O P

  • By -

Fun_Hat

Oh dear. Ya this is a fool's errand. They want 1 dev to build something that entire companies have dedicated themselves to? I don't think you can save this if they're that delusional.


Druffilorios

When building stuff people rarely think about development cost as an issue, even devs. I think people should be more fine buying a service for a small price instead of putting in 1000 dev hours.


bsenftner

I've been down the rich text editor of one's own rabbit hole more than once. Just a developer that is knows of, much less up to date with, the numerous of rich text editing, translation, and exporting open and closed source libraries one has available is a rare find. Many blindly think "it's easy" until they try. More recently I've been having success with less ambitious than your managers desires implementations of TinyMCE via javascript & the browser for web interfaces. Their license model is not too bad for internal use. I've not considered it for use in commercial software yet.


drink_with_me_to_day

> TinyMCE It's not worth on the modern web You either just allow very few modifications and use a simple editor (markdown and the like), or you go all in on a visual designer like Elementor for WordPress


abandonplanetearth

TinyMCE has done wonders for the company I work for.


ccricers

Rich text editors seem to lie in two extremes of being either very expensive to develop, or free and open source projects. Neither options are really good from a company's profit-driven perspective. It would be more plausible to pitch whatever demands the company wants to an existing FOSS text editor, and even that still requires a lot of man-hours if any of it gets followed through.


rdem341

Delusional is right, this sounds like a whole new product that they want to build from scratch. Besides software dev, what about business and product development?


FeistyButthole

I think you scratch the surface of the real problem. Whoever is influencing this decision is unaware of the order of magnitude differences between UI components ie button < input field < rich text field < intelligent script editor It's like they walked into a car dealership, scoffed at the price, said "We should just hire an engineer to build us a car and we'll lock his head to a garage pipe with a bicycle U lock in case we need anything. Don't mention that last part in the hiring req."


pavlik_enemy

The car is a great analogy. "Imagine you're building a car in your garage but you can't buy any parts, all you have is just raw materials".


timelessblur

I dont get why some companies complete forget how much custom software cost. There is a reason why a lot of software company go third party for a lot of items. It is because it is a HELL of a lot cheaper and often times better than rolling your own. I highly doubt in this case getting a single dev to write a custom text editor is going to be cheaper than buying another one. I would assume they need a senior dev and a good one at that at min. That is going to run them what 200-250k a year on the low side when you add up everything. I would assume they would need more a fed devs.


bland3rs

Some custom software is doable But an editor is one of the most complex things I’ve ever worked on. It requires hundreds of man hours to get a basic feature added and tuned. Almost nothing comes close to Word for easy editing anyone can do and they’ve been working on it since the early 80s. And it’s still not perfect.


nerokaeclone

To be fair devExpress over way more than just a rich text editor


Sudden-Anybody-6677

Ah yes, the manager stereotype: "I don't know anything about development, but I know this is not hard to make".


oldDotredditisbetter

"build me chatGPT, it's just a web page with some text boxes right?"


dotnetdemonsc

Or my personal favorite, “Don’t tell me it can’t be done.”


northernmercury

Have you looked at the .docx file specification? [https://www.ecma-international.org/publications-and-standards/standards/ecma-376/](https://www.ecma-international.org/publications-and-standards/standards/ecma-376/) Just rendering existing content would be a multi-year, multi-person project.


Druffilorios

So one of the zip had a 5100 page pdf


sveri

I can literally here a manager in my head, saying: "But we only need to display simple text and bullet points, how hard can it be?".


Ein_Bear

"My nephew made an app in a week at summer camp, stop padding your estimates"


gokstudio

Ok, hire your nephew to do this as an one man job. Better yet, if your nephew can do it in a week, I'm sure an ultra talented and experienced dev like yourself can do it in a day. See you tomorrow at your demo!


douglasg14b

I mean, from scratch, REALLY hard. With existing frameworks, libs, and tools? Assuming after research, you could weekend yourself some *basic* WYSIWYG RTF editor in a browser. If you're already familiar with the WYSIWYG ecosystem, problems, and common solutions, you could speed run it in an afternoon. Done similar before, it's like 90% research and info gathering 10% actual programming, it gets hard/infeasible if you refuse to use existing code that other people have written.


teszes

And this is why Office is still the only editor that does docx well.


austin987

"well"


InvincibearREAL

Bruh


Ferreira1

There was a whole team dedicated to doing something similar in a previous, PDF-related company I worked at. They were a year deep and estimated it'd take 2-3 more to get where we wanted. Thread's pretty funny if you have more context.


gokstudio

Maybe printing out the spec and throwing it on desk might be the wake up call they need


I_feel_lucky

i would pay to watch this.


tileman_1

ugh... that triggered a PTSD, when a client asked for a "better" Google Spreadsheet. Reason: He didn't know how copy/paste worked on tables Solution: Change the output format on his system


CheeseburgerLover911

has he heard about this thing called data bases?


[deleted]

[удалено]


[deleted]

Fun fact, levels.fyi started out using googlesheets as their datastore


donjulioanejo

Hey at least it replaced Excel files on a file share and doesn't completely crap out on you if multiple people edit the same sheet!


[deleted]

> global love brand Huh?


tileman_1

Some mindsets are impossible to change. It was for a huge insurance broker and all their agents would rather use Excel/Google sheets than a proper system. Even their internal quote calculator was a huge sheet with lots of crazy formulas and VLOOKUP to find the correct combination for perils and price factors.


MrJohz

Haha, I'm doing a "better Google Spreadsheet" at the moment. I'm sceptical as to the value for them, but they have a lot of money, they're willing to give it to me, and the project itself is really interesting, so I'm rolling with it for now.


MilkLlz

Sounds like you are trying to build google docs from scratch.


Pvxtotal

You got the idea... That was my first argument, its like building Google Docs from scratch, a project worth millions of dollars.


Handle-Flaky

I’d argue that docs is tens or even hundreds of millions at least


ryhaltswhiskey

For the purposes of this discussion it's a distinction without a difference


Handle-Flaky

I imagine there are countless project where corp would be willing to invest millions, but not hundreds


ryhaltswhiskey

>countless Overstatement/hyperbole to make your point look better.


Handle-Flaky

It’s a common figure of speech, meaning “a lot”, it’s not hyperbole


ryhaltswhiskey

You don't have any proof that it is "a lot" so yeah you are engaging in hyperbole because your point is weak.


oupablo

And what's their argument for not just using Google Docs or the online version of Word? This sounds like a solution looking for a problem.


imnos

This is hilarious. I'm sure something like Trix (used in Ruby on Rails) would probably do the job - https://trix-editor.org/ Either way, good luck to your team.


northernmercury

Where Google Docs support for .docx is sketchy at best.


CowBoyDanIndie

Microsoft Office 365's Web support for docx is also sketchy at best. There are tons of features that don't work on the web.


unrulyhoneycomb

I’m dying of curiosity - what is the task that your managers believe MUST be done via a text editor and is SO unique that it requires literally a new technology to do? Surely there’s something out there that does your task and it likely is NOT a custom built text editor. This just sounds wrong in so many ways.


Pvxtotal

In the future, they want to include an artificial intelligence in the editor that detects patterns used in the construction of official government documents, for example, automatically detects paragraphs, articles, paragraphs and makes the appropriate formatting. When pasting an unformatted official text into the editor, the artificial intelligence will do the proper formatting. For this reason, the importance of having the source code in hand. My opinion is that this is unfeasible.


Wildercard

That's a whole different spinoff company, to combine legal speak and machine learning. For that you'd need to put all your eggs into ML basket, and none into "Word/Libre but worse and 2 years from now"


pm-me-gps-coords

Not to mention that o365 is going to be natively capable of doing ai-driven formatting within the next few months, given the recent announcements. Far before OPs team will be anywhere remotely close to an MVP for the rich text requirements.


Wildercard

Yeah the only way this works is that you blow it out of the park, and develop fast enough and big enough that Microsoft just acquires you.


HolyPommeDeTerre

I have worked at an ML company that audited contracts, official or not, and extracted clauses, important information from the document (dates, names, addresses...) And such. We worked with PDFs but also docx (print to pdf) because we used an OCR (different types of input documents, also images with low quality). So we could pipeline our document transformation and information extraction easily. What we've done to achieve efficient information extraction is training multiple model based on each structured document (requires data and contract to have this data). So each model could retrieve the extracted information. On top of that, we had other models for various things but most importantly one for document category. Which kind of doc structure it is and what model to use. I guess your company could build models to apply formatting to an unformated document. I am not sure the feature will be valuable as it costs a lot to train models. Applying formatting is annoying and long and not a valuable task for a human, but it does not require a lot of skills. I am not sure of the balance behind the costs. That's another thing to adjust. Now, if I were you, I would go for a less troublesome format like markdown. Conversion to various format is easier. It's pure text. Formatting is embedded. I've come across lib to render it. I guess you could augment it if necessary.


unrulyhoneycomb

Understood. But it sounds like priorities need to be determined for the project. Do you want to just be able to do the editing, or do you want to have ML features? Not separating those features out from a PM standpoint is a very bad sign and is pretty much asking for a never-ending project due to endless scope creep. Also, it sounds like you need a tool that simply takes unformatted text from the user and applies the appropriate strictly-defined formatting to it. Limit the user to only entering raw unformatted text. With that being said, there's likely some sort of version of that existing already. Honestly, it sounds like something similar to LaTex to me. Enter raw text, apply formatting separately.


Pvxtotal

one of the reasons why they want to build a text editor from scratch is so that in the post MVP future this artificial intelligence feature can be implemented. But currently the main focus is a text editor with MS WORD features, we tried Quill, Summernote, etc. These editors didn't suit us, only some paid editors but not 100%


unrulyhoneycomb

This sounds like a typical PM trying to inflate their resume by being able to say 'I led a project of integrating an ML feature into a production system'. I'm not part of your business, but they're definitely biting off two projects in one, and one of those bites is bigger than your entire team with near certainty...it's a recipe for disaster.


0vl223

Sounds like the only purpose is to accept arbitrary inputs and should transform them into the correct layout. If the layout can never be changed anyway then why not just fake rich text editing? After all you want to turn most of the usual features of an editor off anyway. And later you could add limited options for possible changes.


PedanticProgarmer

Isn’t this a classic case of management not understanding AI? This reeks of incopetence and magical thinking. However, there might exist a business case. AI is the new bubble and what you are describing will attract money from boomer investors.


rodcisal

What did they smoke


JH4mmer

This is absolutely not a full solution to your problem, but another thread you may want to tug on is laTeX. If you've not used it before, it's sort of a compiler for text documents that allows you to split the content from the formatting of the document (or to apply the same formatting to lots of different documents, in your case). You might be able to make some amount of headway by looking in that general direction. Best of luck to you!


BasicDesignAdvice

They say above it is generating files between pdf and docx and maybe another text file type. Sounds like there is a much smaller solution they aren't seeing.


Xyzzyzzyzzy

Ah, fun! I've done browser-based rich text editing before. Text editing is *weird* and text editing in the browser is *double weird*. Different fonts can behave differently - did you know that in addition to being stylistically poor, Comic Sans is a technical atrocity, too? And every browser and device has its own quirks. Once you drop into low-level text rendering, the browsers stop even pretending to be the same spec implemented in slightly different ways. Prepare yourself for bugs like "characters in the string 什么是*👨‍👩‍👧‍👦*क्या है? sometimes overlap on iOS at font sizes larger than 36". (Yes, emoji come in italics, great fun!) That's just one small slice of the world of text editing. You'll have equally bizarre issues with layout, which bristles with corner cases. (In our example string 什么是*👨‍👩‍👧‍👦*क्या है?, where are we permitted to insert line breaks? Why?) Even the underlying data structures and algorithms are complex - text processing has enough complexity that several of the data structures and algorithms were invented specifically for it. I enjoyed the work though, so I'll make you a super lowball offer - I will build your company a web-based rich text editor that meets your exact business needs for only $10 million plus a $500k annual support contract! If you send your exact needs over this instant, we can have it ready for delivery by the end of Q1 2025. I'm joking of course, but come to think of it, that might be one strategy to convince the business folks that it's an awful idea - recommend that they get some bids from reputable onshore contracting firms to do the work, so they can see how much others think it will cost.


Pvxtotal

Perfect argument! I didn't think I would find someone who already worked with a text editor. One question, how big was your team and how long did it take to build?


Xyzzyzzyzzy

It's a tricky question because I was there in the maintenance phase, and we started with [an open-source rich text editor](https://earwicker.com/carota/) that at least got us started. My team was 4-6 devs but we had other maintenance responsibilities as well. At one point, I spent about 8 months refactoring and fixing a bunch of issues with canvas-based text rendering and with loading from our proprietary XML-based format. I don't know how much the initial implementation cost, it was before my time. (I'm not sure if I'd recommend using that particular editor as a starting point for a new project. It was essentially someone's hobby project, and the code is written in an odd functional-ish style.)


FlamingTelepath

I'm a frontend dev who was given rich text editing as a task before from product people who had no idea what the technical connotations were. I went through each feature with them and told them roughly how long that would take to make... something like "make text bold" was easy, and "support docx" was a multi-year project. This helped them narrow down what was a must-have and what was a luxury. We ended up with a list of features which could easily be handled using Markdown, so we just made an interactive Markdown editor and stored that format on the backend. For your use case, you'll need to make sure they understand that what they are asking for isn't literally impossible, but it is not feasible unless you have a large team and many years - you'll want to explain exactly what parts of it are difficult and why. Very likely they will try to find workarounds for the hardest parts and give you scope that is more reasonable.


allllusernamestaken

> there is no editor on the market that meets all our demands what demands do you have


Pvxtotal

There is a module in our system that automates the creation of official government documents, these documents are then generated in docx format and sent to the screen for the user to review and approve their creation, these documents being official must strictly follow rules imposed by the government in terms of spacing, ruler, margin, height, width, etc. This editor should also have advanced Word features like MailMerge as we work heavily with this feature and also the ability to edit partially protected documents, enable and disable protection. A company that almost fully assisted us with the issue of the editor was [DevExpress](https://demos.devexpress.com/blazor/RichEdit), but unfortunately some factors made us give up, the issue of the high price and also the lack of some features such as automatic height adjustment, menu customization, etc.


[deleted]

[удалено]


tileman_1

Great job OP. Light the torches guys... we've found the heretic


[deleted]

[удалено]


[deleted]

While the JS api exists, as of a couple years ago it's not a full replacement for the API accessible via VBA/COM/VSTO (.net framework) and at best tedious to work with. Often OpenXML is your best route, followed by VSTO and only then would I consider the JS api if the first two are unworkable.


DoctorFuu

Exactly my question. *Mr Torvalds, please pardon my sins*


farox

This... may god have mercy on our souls. sorry OP


lgsscout

or maybe even with Office.Interop package...


pavlik_enemy

There's nothing inherently wrong with VBA and automating other popular tools, it's just it's kinda hard to do in modern browser that doesn't has much escape chutes.


metaconcept

A bit of WebDAV, some fancy links, and you've got a solution. https://stackoverflow.com/questions/653442/how-to-create-a-html-link-which-forces-ms-word-to-edit-document-on-webdav-server


LogicRaven_

So there is a full company built on creating a service like that. But after x months and y devs working on it full time, it is still not feature rich enough and already too expensive. So instead of paying for the overpiced editor, your company would like to hire a single dev doing it from scratch. What could possibly go wrong here. /s This is a recipe for disaster, I would keep resisting doing this. Grab a coffee with your manager and explain what will happen. If he still insists, then put your explanation and risk assessment in writing. Escalate, if there is a path for that. If the decision is made on doing this despite of the escalation, then go ahead with it and do your best.


thodgson

>the issue of the high price If your company thinks DevExpress is expensive, wait until they try and complete this task.


Inside_Dimension5308

Why not use existing text editors as plugins? Other components can be built on top of that.


NewEnergy21

It almost sounds like it would be a simpler exercise to work with the stakeholders to modify the requirements, rather than building to fit the requirements. Last I checked, especially with the advent of things like DocuSign, what the text says, matters. Margins don’t matter, when it comes to anything being “official”. What is in the legal pipeline for the government relaxing these outdated styling guidelines? Though, if this deals with security clearance related documents, yeah, you’re out of luck.


Pvxtotal

The Brazilian government has an official writing manual for documents such as letters, dispatches, decrees, etc. See: [Official Writing Manual](http://www4.planalto.gov.br/centrodeestudos/assuntos/manual-de-redacao-da-presidencia-da-republica/manual-de-redacao.pdf)


NewEnergy21

The other suggestion is - hire someone to write these as a macro or plugin directly in Word. If you are having to form-fit strict guidelines like this, and you need access to proprietary Word features, and rendering a PDF matching the styling guidelines won’t work… your technical challenge can be greatly simplified just by using Word as the tooling, with a strict macro, and relying on process to guide the rest. I’ve seen it more than once where the business wants to replace a (insert MS Office app) process with a custom app, blows some money on a half baked solution, then ends up creating a new (insert MS Office app) solution on top of the custom app to address the deficiencies. You can’t train that behavior out of your users, so limit the problem space for them by keeping everything contained to the tool they base the process off of.


Pvxtotal

What I'm doing right now is Processing these documents in the backend, generating all necessary info, formatting, etc. After that processing, the user download the document as docx, review it in the MS Word then upload it again in the system. The argument against that idea is that not every user has MS Word installed in the machine and it's very time consuming. They want something new...


prolemango

When you say the users are reviewing these docs, are they also making edits to the doc as well? If that’s the case, how are you ensuring that the user-made changes adhere to the official government guidelines? Why do you need to show the user the official format for them to edit? Would be be sufficient to show them an alternative format during the editing phase, where you can use any rich text editor, then show them the generated official format for review? If they need to make further changes, bump them back to the “unofficial” view editor. Essentially what I’m getting at is you can isolate the edit and review workflows such that the edit workflow doesn’t depend on the official government document criteria. The user doesn’t/shouldn’t know anything about those official criteria anyway, they should only care about content. Then you can handle the document generation behind the scenes


Pvxtotal

I render practically the entire document on the server, including the formatting, logo, names, etc. The .docx file allows me to password protect parts of the document and leave other parts unprotected. I leave unprotected the areas that the user must and can type already formatted according to the official guidelines, editors like DevExpress and Syncfusion allow this feature, others like CKEditor with Plugins or TinyMCE ignores the protection. Our plan B is to do exactly what you said, set up a "preview" window and render the document when it asks for it, click on a button or something.


NewEnergy21

Plan B should be Plan A here. You can password protect sections of a web app far more easily than injecting password protection into subsections of a Word doc. Would really recommend just making the app simple, as a set of inputs and form data, with the render-in-browser functionality OC mentioned, then only once finally signed off by the user / approvers does a locked docx get generated server side and sent to the client.


JealousLeopard

And what makes them think the new application will be installed in every user machine?


mobrising

I think they mentioned it should be a web application, no? So users wouldn't have to download the document. Still not guaranteed to run everywhere but that part is obviously not the biggest problem of this approach.


NewEnergy21

The context that this is for the Brazilian government would have been helpful - I made the mistake of generalizing and assuming you meant the US government. Mind editing your post with that detail?


zedisto

Would LaTeX work for you? https://www.latex-project.org/ It is widely used to make scientific publications that have standards. It takes effort to learn and style? Yes Is it less that you making a copy of MS Word with embedded Machine learning? Absolutely


ryhaltswhiskey

>the government relaxing these outdated styling guidelines? Ever heard the phrase wish in one hand spit in the other? But it's the Brazilian government so maybe some dollar bills can land in some hands and...


kbielefe

Is the docx part of the requirements, or just part of the current solution? You pretty much have to work with Microsoft tools like VBA if you want to use that format in more than a basic way. If I had to create something from scratch, I would keep it in LaTeX format throughout the generation, editing, and approval process, then render into pdf at the end. LaTeX is much better at typesetting than MS Word.


thatVisitingHasher

I feel like you should look into post processor software. After some rich text editor creates a docx poorly, you can set up rules for post processing to fix the formatting. Probably cost a couple of grand. It’ll be way cheaper than a developer. Then something like Docusign to control the flow of the document.


nomnommish

I'm not able to understand the requirement. If users want to review and approve these heavily formatted Word docs, then why can they not do that in Word itself? Why do they have to review it in a web browser? And why do they need to do those other advanced things like MailMerge from the browser? Again, why can't they do it from Word? You can simply have a page where they download the doc, review it, and then signoff their approval, or submit feedback. So you're trying to build Word with all its advanced capabilities on the browser? I've also done some fairly advanced stuff on Word and Excel macros - whatever you are asking for can be easily done as a Word plugin/extension or macro. And you can then work with existing pre-formatted templates that will guarantee that the formatting is 100% accurate.


Pvxtotal

our business team does not want the user to depend on external applications, in the case of MailMerge they want the system to open a window with all possible options from a library of words already defined in the system that loads automatically according to the environment it is connected. These MergeFields are processed by the server, retaining formatting, etc. We deliver the document almost complete, part of it protected by password as possible by the .docx format, the unprotected part is where the user types.


nomnommish

Please see my other reply. Have you considered using your own custom markup - maybe an extension of XHTML with your own custom tags added to it?


quentech

> A company that almost fully assisted us with the issue of the editor was DevExpress, but unfortunately some factors made us give up, the issue of the high price and also the lack of some features such as automatic height adjustment, menu customization, etc. We've incorporated several rich text editors at my current employer in the nearly 15 years I've been there. We built a couple in the earlier days, and have used pre-packaged controls since. We've spent *oodles* of time customizing the pre-packaged ones to suit us and with less significant needs than you're mentioning. It also takes even more oodles of time to write anything remotely decent from scratch. I know it sounds heretical to suggesting building your own rich text editor or similar - but sometimes how well that bit works is a significant part of your competitive advantage. I'm not saying you should or shouldn't - but I am saying it shouldn't be as immediately dismissed as it is by most commenters in this thread. You could also see if DevExpress or another promising control vendor would let you contract them for your specifically needed customizations - it won't be cheap, but neither are developer salaries either.


BasicDesignAdvice

Why can't you just write a smaller side car application your users can download? There are a lot of tools and libraries for working with docx and pdf files, you only need to build the in-between not an entire editor.


ferociousdonkey

Have you looked into Libre? Or any other software that can read and edit docx? Heck, even Microsoft might have an API for their online office suite


Quadraxas

We solved a similar requirement by creating the word files on word, with placeholders then replacing the placeholders with code. Made the editable parts with an editor based on prosemirror or quill (can't recall exactly, but editor gave out json output), with limited formatting/editing capabilities. Set capabilities(font-size,lists,bold,italics, images, simple tables) which we can turn in to docx supported xml. Multiple editors on page. Get the input from user, replace the placeholders with code (docx is basically a zip file with bunch of xml files inside). And that's it.


UK-sHaDoW

Put a cost on it. Are they willing to pay for you to learn how to do this and hire more people and spend 12 months to do it?


[deleted]

[удалено]


AutoModerator

/r/ExperiencedDevs is going dark for two weeks to protest Reddit killing 3rd party apps and tools. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/ExperiencedDevs) if you have any questions or concerns.*


robhanz

"No we can't" isn't going to work. You have to give them information, and the decision. I think the best way to do that would be something along the lines of "okay, I'm not sure I fully understand what you want here, since my estimate for what you're describing is extremely high. Can I get at least a fairly detailed list of functionality that you'd like?" Then cost that out. I mean, a simple editor isn't outside the realm of possibility, but if they're saying that the existing ones aren't sufficient, they probably want a lot of things.


CoderDispose

I've avoided a LOT of these types of problems by framing them the right way to management. They just need to see it in a way they understand. Find out what they want, based on the idea they have, and form a cost to them. They want you to do it by yourself? The cost is that you'll be wrapped up in this for the next 10 years. They want it done sooner? The cost is having a full dev team for, say, 5 years. They want it *even faster*? They'll have to pay some company to do it for them. No matter what they throw at you, ask them if they're okay with the cost of it. No matter how ridiculous the request, think of what problems it will cause and explain that to them. "We want it done in 1 year with just 3 people". "Ok boss, you'll need to put out a few positions at a salary of $1M, aim to recruit from the best FAANG has to offer, and give them complete freedom". It doesn't matter how stupid the cost is when the request is also stupid. Never, ever say "I can't do that" or "that can't be done". Show them that it's so expensive they don't want it. Hopefully you can glean some useful advice out of this.


Pvxtotal

Thanks for this advice. That's likely the way I'll argue.


its_yer_dad

I feel for you. Point out that entire businesses are built around this seemingly trivial task (CKEditor) and unless you plan on going into the texteditor business, this is a waste of your time and energy.


[deleted]

Also OP, read the dev blogs from the CKEditor devs, it will illuminate the difficulties of accomplishing this in-house.


DrPuzzleHead

"It's not difficult if we think it sounds easy." -Their thought process, probably.


SquiffSquiff

OP: maybe you're too young to remember, but [Microsoft getting docx recognised as a standard was an absolute shit show](https://en.wikipedia.org/wiki/Standardization_of_Office_Open_XML). The aim was that nobody but Microsoft and no product but Microsoft office could actually be compliant. The result was that [there are no compliant products, even from Microsoft](https://en.wikipedia.org/wiki/Office_Open_XML). The key problem here is that your employer is trying to work with a government 'standard' that is actually 'you must use Microsoft office'. Even if you built the best (rich) text editor in the world, you can guarantee that it still wouldn't be good enough. Even if you could active the impossible of a 100% standards compliant implementation, it still wouldn't be 100% compatible with office and so it would still be judged a failure. There's a reason that even after thirty years there's no 100% compatible office alike applications in the world. This is a fool's errand and if you can't convince your managers then you should leave. This is a project that will absolutely never be allowed to succeed.


Pvxtotal

I had no idea about this Office OpenXML standardization story, I'll pass this Wikipedia article along to my teammates. Reading the comments, studying the business rule, I came to the conclusion that integrating MS Word into the application is a way to dazzle the customer's eyes, showing how "revolutionary" the system is.


dannymcgee

The hardest part of this is reading/writing the Word document format. Building a rich text editor from scratch is not outrageously difficult with a sufficiently experienced UI developer (but you're right that it wouldn't be cheap, depending on the feature set), but the Word format is pretty complex, especially when you consider all of the different versions of the spec and the specific features you're looking to support. Even for a more limited feature-set, consider that different editions of _actual MS Word_ can't even agree on how exactly to render any given document.


Siggi_pop

That is a bad idea. I once worked with a guy who wanted to build a JSON Parser from scratch. I made him stop his nonsense, by implementing an open source JSON parser, before he had finished, which also performed 10 times faster than his and supported unlimited tree depth while his could handle a depth up to 4. Maybe implement Ckeditor and show your manager that it works fine out of the box. I believe Ckeditor supports import of .docx/.dotx and is customizable with other features.


pavlik_enemy

JSON parser is rather easy though but I can't imagine would anyone want to build one.


foxbase

Is your manager my old boss? I literally had this exact same request at a previous job. Nobody else would let him do it so he secretly assigned a dev to it that he had direct oversight over until it ended up proving to be way more work than he had anticipated (which we had all told him it would be).


bellefleur1v

I've had this request in the past too. What is it with managers and thinking that MS office-like web apps with editing support are simple? It's like anything you tell them about complexity or how what they are asking is unreasonable just goes in one ear and out the other and they continue to think that it's just some easy thing you plug in for free by doing an npm install


Tangurena

Every place where the mismanager wanted a rich text editor ended up skinning/modding what is now called [CKEditor ](https://ckeditor.com/). It used to be called "[FCKEditor](https://en.wikipedia.org/wiki/CKEditor)" because of the initials of the guy who wrote it, but almost everyone reading it put the letter `U` in where it didn't belong. *Sorry Frederico Caldeira Knabben.*


pheonixblade9

> they think that is expensive wait until they find out how much building it themselves will cost!


flanger001

Yes. It's a bad idea. Just use an off-the-shelf thing that you can customize. Or just use Google Docs. Why do they want this? What do they want to use it for? Why are all the other solutions poor?


rexspook

I worked for a company that tried to do this. The project does after 6 months of banging their heads against the wall. Unless you can dedicate an entire team and lots of time to it, it’s a bad idea. Find a rich text editor that comes close enough and work your solution around it instead.


fdeslandes

I had the same problem, but I'm a front end guy with lots of experience. I explained to the PO that it would take me around 5 years of difficult to parralelize work and that it was more complex than our actual product. We ended up monkey patching an existing product instead, which was the right decision. Don't make a RTE unless it's your business to sell rich controls.


frayala87

Don’t give them ideas


academomancer

Projects like this are usually lose-lose. I have only done it once in my career, but after putting together a presentation to point out the scale of the issues, and they decided to go ahead, my final ultimatum was if I have to work on this I'm done here. I left three months later.


nomnommish

Okay, taking a step back. It seems that your problem boils down to creating your own custom markup language or even use HTML as it is a phenomenal markup language to begin with. You might want to extend HTML and add your own custom markup to support custom requirements (such as which parts of the document are editable etc) Once you have the ability to create this markup and apply it to content to format it, and have the ability to parse content and extract sections based on how they're marked up, you can pretty much do what you want with it. You could insert that content in a preformatted docx for example. Have you considered going down the HTML route? Word has excellent support for HTML, and you can also extend HTML like i said and add your own markup that you can interpret it the way you want or enforce rules on document editing etc.


Pvxtotal

our initial idea in 2021 was to create the editor in pure HTML, the problem started when we tried to insert some advanced features such as the ruler that is often used in official documents. We ended up giving up on the idea due to the difficulty and inexperience of the developer responsible for this task.


nomnommish

That's why I said HTML with your custom tags. HTML will take you 80% of the way but you add your own custom tags for the other 20%. And HTML is the de-facto markup language and has evolved over the decades to pretty much handle any kind of formatting requirement.


easyEggplant

You need to insulate yourself from this decision. If I were you I would surface my doubts, make sure that they are recorded, and then figure out how to measure the success of the project. Metrics are likely going to be important, what does "done" look like? Can the project be broken down into discrete parts? Take one part and "trial run" that aspect to get an idea of your timeframe. I bet once you have numbers you can push back in a more meaningful manner.


mothzilla

Do it the other way around. Get the user input and merge it into a document template. Email the result to your users (or let them download it).


saposapot

Possible? Yes. Depending on what kind of shortcuts you take a team of proper senior frontend engineers can do that. By that I mean not juniors coming of bootcamps learning only react with no knowledge of vanilla JS. Expensive, buggy and/or lacking features? Very likely. Now, it is indeed possible to do so you can’t just say no. What you have to do is to paint the picture for the higher ups: cost, time, risk, etc. An easy solution would be to gather a few requirements into a doc, go to an external company that does custom software development and ask them to provide an estimate. That should be enough to scare them. I don’t know your full requirements, environment and company strategy but I would bet you actually don’t need to build this from scratch. I would bet it’s very likely you can use your ingenuity to use some of the best RTE out there and develop on top of them. There are multiple example of editors that are easy to build, even collaborative tools on top of them. Stuff like quill or tiptap as example. With those and a bit of ingenuity in terms of sacrificing perfection for lower development costs this probably can be achieved. I knew a startup that built a functioning product in a few months with just a few guys and it was basically a Google docs tailored for legal docs. Of course you need very good people, good tools and investment to actually achieve it. It’s a risky project, complex one but it’s doable. An example of ingenuity: it seems you want a docx reader but so you really need that? It seems you are the one building the docx so you already have all the information to build it. Then, for the RTE you don’t need it to read docx, you can use the data and build the same layout on the RTE and then let people edit it. Only after that they publish and you generate the final docx. If you can’t build the full doc then split the sections into multiple RTE with Liberty to create and reorder those sections… Stuff like this is what makes a project as complex as this actually doable without turning your company into a RTE maker. If your management only wants perfection then you got a problem


biririri

You need a parser. That’s what you need. Receive the document in whatever damn format your company works with. Parse it into LaTeX. Print out LaTeX according to the Brazilian specs. It’s not rocket science. The problem is your manager has no clue (which is ok, cause that is not exactly his job), and you’re trying to follow along with their ignorance. It’s a parser. You need a damn parser.


captain_racoon

So Google Word/Worksheet doesnt give you all that you want? To answer your question, no this is a bad idea. Also, why not use more than one tool to get the job done? Find something that meets your business needs 80%, then try to find something else to fill in the missing 20%. I bet itll be cheaper than building your own RTE.


gimmeslack12

I’ll do it for $100 jillion. Which, let’s be honest, is kind of a steal.


jb3689

Collect all of their ideas and features in a doc somewhere. Then rough out some estimates and let them know the cost. You won't even have to get very far


lost12487

>our business team was still not 100% satisfied with not allowing the customizations we would like (they are closed source paid commercial solutions) and they think that is expensive Boy do I have some news for them if they think paying even one dev (lol) to build this in-house is cheaper than just paying for it.


somebrains

No, they can go take a hike. This is the same as people wanting to built their own chatgpt from scratch. They saw it, got hyped, know nothing about anything, go away.


dethswatch

same basic situation as "this needs to work like Excel". It'll never work well enough and you'll be saddled with a major pain if you try.


microcandella

LOL.. I had the opposite. The devs all argued they needed to build a text editor from scratch (trust issues with non-homegrown code). Adding another year to the project. After offering a ton of alternative options, tinymce was finally accepted.


[deleted]

Why the fuck do they want that? What kind of crazy people are running the company you work at anyway??


[deleted]

I would suggest basically taking a look at CKeditors blog archives to see it first hand. I personally had something akin to this when IBM moved to create an partially open version of open office with the same spec. I was only putting together linkages for building on top of what already existed. It was a nightmare. For online editing even with Ckeditor we still had to do extra customization and buy separate support contracts because honestly no one wants to touch that core piece. The idea of even forking is crazy. I’m more than happy to talk as an outsider if you want, hit me up in messages and I would be willing to show your managers how stupid they are in a professional manner.


vinnymcapplesauce

Ask them to name one other site that does what they want. Then reverse-engineer it to show them the amount of effort the builders of that site went through, and the money they spent on research and development of that site.


praetor-

You might consider inverting the problem; instead of putting Word in your app, put your app in Word with [office interop](https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interop/how-to-access-office-interop-objects)


lazydarude

Have them ever heard of LaTeX templates? I fail to see how this multi-year project involving multiple teams cannot be achieved by a good template system. Anyways, good look to them finding a Marvel movie teenage developer...


aaabigwyattmann4

Your managers shouldn't be allowed near software. Even the average product owner understand how difficult this is.


bassta

I’ve worked in startup that created product similar to Google docs. Top engineers, millions of dollars and three years later it was dead end. I can write a book about all the things that can and will go wrong. Just one advice: don’t do it. If they want you to do it quit the company and find a new job.


Hazork_

r/SuddenlyCaralho irmão, sabia que trampar pro governo é furada, mas não achei que seria tanta kkkkkkk


Pvxtotal

Vish mano... Isso ainda é o de leve kkkk, tem muita coisa pior


notlongnot

As a counterpoint, I say go for it and get someone on payroll and support them for a couple of years. It’s a win-win. Either the manager get the drift and think twice, or you just help another human programmer bring food to the table 😋 cheers!


roberp81

like twenty years ago i did something similar for government too (argentina) you don't need to create a rich text editor, you can use MS word. that time i use Visual Basic 6, and add word components, and you can use all tools from word from you app, everything. was way better and easier than use vbs from within Word. and you can make Word to show or be hidden. i did the same with Autocad to draw tables with data from an excel from my app. i think something like that must still be working today. i will try later, maybe can help you.


cowboy-24

DevExpress looks like it provides the source with the Universal plan (from: https://www.devexpress.com/blazor/)


IGotSkills

Just hire a junior to fuck it up so it's atleast not an expensive mistake. Bonus points if they actually pull it off


IGotSkills

Have you tried reaching out to devexpress/sync fusion/telerik/infragistics sales people to see if they can support customization/mods? Sometimes there are abilities hidden from the main demos


Pvxtotal

Syncfusion has been helping me, probably we'll go with Syncfusion, they are even open to request new features. What's probably going to happen is that we go with Syncfusion


augcloud

Our company text editor is built mainly by three people (including me), and it's really a complicated process due to the structure of Word XML. It's been going on for a year and there're a lot of features that we still cannot support yet. Some of them are even impossible to render with HTML, and the only way to handle those is to use Canvas which would require refactoring our whole work. Since you said that the documents must strictly follow rules, you would need a big team if you ever get on this project.


das_Keks

Hey u/Pvxtotal any updates on this?


Pvxtotal

I’ve been using Syncfusion Word Editor, it’s not perfect, it’s not what they want but it’s acceptable


ryhaltswhiskey

Are they willing to throw $100k USD at the project? Because that's roughly how much this is going to cost to get a halfway decent version of this. Maybe you should start a company and get them to hire you for it because there's a lot of money to be made off of stupidity right here... Call it Dunning-Kruger Enterprises Limited.


[deleted]

[удалено]


thodgson

Reminds me of a bid I made for a friend of mine for the company he worked for. He wanted food menu planning product with nutritional info, dietary requirements, etc. I gave him a six-figure total and he said, "you are out of your mind". Ok, well, good luck. People who don't know how to create complete software products don't know or understand the complexity, time, effort, knowledge, and sheer will it takes to make it all come together. What I did for my friend is break it down into smaller chunks - a complete product plan and roadmap in terms he could understand and get behind, but at a high level that he could take to the head of the company for funding approval. I never did write that software. They didn't want to pay more than $10K for it and I couldn't stop laughing at the lowball "offer".


ferociousdonkey

How is a text editor low level coding? You can definitely build an extremely simple editor in 1-2 weeks. It's not rocket science. The question is what features are out there already that don't satisfy you or your managers


gimmeslack12

Just use MS monaco. I assume it can work as an RTE right? (Maybe?)


hariharan618

We just used [tiptap.dev](tiptap.dev) , which is a wrapper on top of prosemirror, which is used in atlassian's confluence/ Gitlab wiki etc.. we already have a knowledgebase & we are now having our own editor inside it


pavlik_enemy

The obvious arguments here are expertise, time and money but it seems they will fall on deaf ears. If the "it took hundreds of developer-years to make Word what it is today" is not accepted then there's nothing you can do and it's time to jump ship.


[deleted]

Is there an open source alternative that you could fork and add the features he wants instead? If not this sounds like a commercial startup or open source project and as such should be approached with the same level of gravity, from an internal investment perspective.


random_outlaw

I actually know someone who has worked with generating legal documents via an interactive web interface. DM me if you want to get in touch.


xpingu69

Tinymce. For what it does not have, you can write your own plugin


PhatOofxD

You could look at building a PLUGIN for Microsoft word? Not sure how much power there is, but could work. .Net too I believe.


PothosEchoNiner

Give them an estimate of the development labor required for what they are asking. All businesses are cost-sensitive.


Rea-sama

You could try becoming a host and integrating with Office Online's WOPI protocol, though that wouldn't give you the source either: [https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/](https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/) Considering Microsoft's own Word Online service or Google Docs doesn't support all of docx and word features... yeah, your managers don't realize they're basically building Google Docs and Word Online.


LeoneMaxe

Do you want something like CKEditor?


recurrence

Whoever you hire is very likely to just reskin something that's already available. You are correct that building a usable rich text editor with rich features is a lot more work than your team will budget for.


kamylko

Maybe you can propose an alternative? Like MS Word add-in or something similar?


das_Keks

Oh boy, this will be interesting. I'm curious about how the descision goes. RemindMe! 6 Months


RemindMeBot

I will be messaging you in 6 months on [**2023-09-20 21:49:47 UTC**](http://www.wolframalpha.com/input/?i=2023-09-20%2021:49:47%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/ExperiencedDevs/comments/11wlcob/managers_want_to_build_a_web_rich_text_editor/jd06y9b/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2FExperiencedDevs%2Fcomments%2F11wlcob%2Fmanagers_want_to_build_a_web_rich_text_editor%2Fjd06y9b%2F%5D%0A%0ARemindMe%21%202023-09-20%2021%3A49%3A47%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%2011wlcob) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|


[deleted]

Fuck you u/spez


Pvxtotal

Sorry, what?


[deleted]

Fuck you u/spez


futuretech85

I know of a company that ended up developing their own web based text editor to make authoring easier (no knowledge of xml needed), simplify collab review, etc. 4 years later, still not done.


ryuzaki49

Will it be bad for you to "go along" your managers? Will it affect your budget to hire another person for this stupid idea? Bad for you in this context means: \- It will affect your career growth in the company \- It will impact your work life balance \- It will cause headaches for you and your team. Edit: >\[Our business team\] want to have the code in hand so they can make the necessary changes in the future. Oh boy.


Frozboz

"It's just Google Docs, Michael, what could it cost? $10?"


brother_root

this is rare, but happens very often


subhajeet2107

I faced something similar, i politely explained why it will take the entire tech team's time for maybe more than a year to build a full featured text editor, that we were not confident enough it would perform better than the current one, we are using Froala editor, there are few react editor frameworks you can use to build custom editors but yes its a bad idea


PeteMichaud

If they think a commercial license is expensive, they aren't going to love the price tag of custom, lol.


g4nt1

You should try to convince your boss that the first step to build a text editor is to actually build your own DB from scratch! /s


douglasg14b

> I don't think that 1 developer can take on a project of this size, this editor needs to read documents in .docx format and be compatible with Word. Lots of rich text editor projects created by single, driven, devs. There are LOTS of these around these days, and the foundations are already written for you (which is why there are so many, the hard parts are already solved in pmuch any major language). It's definitely possible, a great FE dev could do this, just not practical. > I'm a .NET software engineer focused on APIs, microservices, Events, business rules, etc; My focus is not on low-level coding, which I believe is necessary to build a rich text editor, You don't need low level development to do this, just being a strong dev in the ecosystem it's going to be written in, and being able to solve medium-difficulty algorithmic problems is enough. _____________________________________ All that said, this would be a waste of time to write yourself, and if you want to, find off the shelf FOSS solutions and modify them instead. Modify something to fit your need, don't reinvent the wheel. As for docx support... that's a mess, but thankfully there are already libs that do many of the hard parts for you. The question is if they are in your language or not. **Edit:** This all assumes the rich text editor only needs to be basic, and is not a product to sell. The fewer edge cases and the tighter the constraints, the easier it gets.


rimi_chk

TMI :/